Updated on 2024-05-29 GMT+08:00

ALTER MATERIALIZED VIEW STATUS

Syntax

ALTER MATERIALIZED VIEW qualifiedName SET STATUS <status>

Description

Modify the status of materialized views. Only materialized views in the ENABLED or SUSPEND state can be modified. The statuses of materialized views include:

  • INIT: The materialized view is created for the first time.
  • SUSPEND: The materialized view is suspended. The suspended materialized view is not rewritten.
  • ENABLED: The materialized view is available.
  • REFRESHING: The materialized view data is being refreshed and cannot be rewritten.
  • DISABLED: The materialized view has been disabled.

Example

Change the status of mv.default.mv1 to SUSPEND.

alter materialized view mv.default.mv1 set status SUSPEND;