mv_infos

Name

mv_infos

description

Table function, generating temporary tables for asynchronous materialized views, which can view information about asynchronous materialized views created in a certain database.

This function is used in the from clause.

This funciton is supported since 2.1.0.

syntax

mv_infos("database"="")

mv_infos() Table structure:

  1. mysql> desc function mv_infos("database"="tpch100");
  2. +--------------------+---------+------+-------+---------+-------+
  3. | Field | Type | Null | Key | Default | Extra |
  4. +--------------------+---------+------+-------+---------+-------+
  5. | Id | BIGINT | No | false | NULL | NONE |
  6. | Name | TEXT | No | false | NULL | NONE |
  7. | JobName | TEXT | No | false | NULL | NONE |
  8. | State | TEXT | No | false | NULL | NONE |
  9. | SchemaChangeDetail | TEXT | No | false | NULL | NONE |
  10. | RefreshState | TEXT | No | false | NULL | NONE |
  11. | RefreshInfo | TEXT | No | false | NULL | NONE |
  12. | QuerySql | TEXT | No | false | NULL | NONE |
  13. | EnvInfo | TEXT | No | false | NULL | NONE |
  14. | MvProperties | TEXT | No | false | NULL | NONE |
  15. | MvPartitionInfo | TEXT | No | false | NULL | NONE |
  16. | SyncWithBaseTables | BOOLEAN | No | false | NULL | NONE |
  17. +--------------------+---------+------+-------+---------+-------+
  18. 12 rows in set (0.01 sec)
  • Id: Materialized View ID
  • Name: Materialized View Name
  • JobName: The job name corresponding to the materialized view
  • State: Materialized View State
  • SchemaChangeDetail: The reason why the materialized view State becomes a SchemeChange
  • RefreshState: Materialized view refresh status
  • RefreshInfo: Refreshing strategy information defined by materialized views
  • QuerySql: Query statements defined by materialized views
  • EnvInfo: Environmental information during the creation of materialized views
  • MvProperties: Materialized visual attributes
  • MvPartitionInfo: Partition information of materialized views
  • SyncWithBaseTables:Is it synchronized with the base table data? To see which partition is not synchronized, please use SHOW PARTITIONS

example

  1. View all materialized views under db1
  1. mysql> select * from mv_infos("database"="db1");
  1. View the materialized view named mv1 under db1
  1. mysql> select * from mv_infos("database"="db1") where Name = "mv1";
  1. View the status of the materialized view named mv1 under db1
  1. mysql> select State from mv_infos("database"="db1") where Name = "mv1";

keywords

  1. mv, infos