Skip to main content
REFRESH MATERIALIZED VIEW manually refreshes a specific asynchronous materialized view or partitions within.
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 executing REFRESH MATERIALIZED VIEW, you can monitor the status and result of the refresh operation in the following ways:
  • Execute SHOW MATERIALIZED VIEWS to 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, the EXTRA_MESSAGE field includes detailed information about the partitions and execution details for each refresh sub-task. See Understand Materialized View Task Runs for details.

Examples

Example 1: Manually refresh a specific materialized view via an asynchronous call.
Example 2: Manually refresh certain partitions of a specific materialized view.
Example 3: Forcibly refresh certain partitions of a specific materialized view.
Example 4: Manually refresh a materialized view via a synchronous call.