CAUTION You can only manually refresh materialized views that adopt ASYNC or MANUAL refresh strategy. You can check the refresh strategy of an asynchronous materialized view using SHOW MATERIALIZED VIEWS. This operation requires the REFRESH privilege on the target materialized view.
Syntax
Parameters
CAUTION When refreshing materialized views created based on the external catalogs, the database refreshes all partitions in the materialized views.
Monitoring
After executingREFRESH MATERIALIZED VIEW, you can monitor the status and result of the refresh operation in the following ways:
- Execute
SHOW MATERIALIZED VIEWSto view the status of the materialized view, including the last refresh time, refresh state, and any error messages. - For more detailed execution information, especially for asynchronous refresh tasks, query the system view
information_schema.task_runs. This view provides task execution records and states (PENDING, RUNNING, SUCCESS, FAILED). For materialized view refreshes, theEXTRA_MESSAGEfield includes detailed information about the partitions and execution details for each refresh sub-task. See Understand Materialized View Task Runs for details.