This topic describes how to manage materialized views.
View the definition of materialized views
- Required permissions
- You must have SELECT permissions on materialized views.
- Syntax
SHOW CREATE MATERIALIZED VIEW <mv_name>
- Feature description
- Returns details about a DDL statement used to create a materialized view.
Query materialized views
- Required permissions
- You must have SELECT permissions on materialized views.
- Syntax
SHOW MATERIALIZED VIEWS [LIKE 'pattern']
- Feature description
- Returns a list of materialized views on which you have SELECT permissions. If a pattern is specified, all materialized views that match the pattern are returned.
Delete materialized views
- Required permissions
- You must have DROP permissions on materialized views.
- Syntax
DROP MATERIALIZED VIEW <mv_name>
- Feature description
- Deletes a materialized view. You cannot execute the DROP TABLE statement to delete materialized views.
Materialized view information table
- information_schema.mv_info
- The metadata of all materialized views.
- information_schema.mv_auto_refresh_jobs
- Records of automatic refresh tasks. Only materialized views configured with automatic refresh is displayed in this table. Up to 1,024 materialized views can be displayed.