MV_INFOS
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:
mysql> desc function mv_infos("database"="tpch100");
+--------------------+---------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+---------+------+-------+---------+-------+
| Id | BIGINT | No | false | NULL | NONE |
| Name | TEXT | No | false | NULL | NONE |
| JobName | TEXT | No | false | NULL | NONE |
| State | TEXT | No | false | NULL | NONE |
| SchemaChangeDetail | TEXT | No | false | NULL | NONE |
| RefreshState | TEXT | No | false | NULL | NONE |
| RefreshInfo | TEXT | No | false | NULL | NONE |
| QuerySql | TEXT | No | false | NULL | NONE |
| EnvInfo | TEXT | No | false | NULL | NONE |
| MvProperties | TEXT | No | false | NULL | NONE |
| MvPartitionInfo | TEXT | No | false | NULL | NONE |
| SyncWithBaseTables | BOOLEAN | No | false | NULL | NONE |
+--------------------+---------+------+-------+---------+-------+
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
- View all materialized views under db1
mysql> select * from mv_infos("database"="db1");
- View the materialized view named mv1 under db1
mysql> select * from mv_infos("database"="db1") where Name = "mv1";
- View the status of the materialized view named mv1 under db1
mysql> select State from mv_infos("database"="db1") where Name = "mv1";
keywords
mv, infos