ALTER MATERIALIZED VIEW STATUS
Syntax
ALTER MATERIALIZED VIEW qualifiedName SET STATUS <status>
Description
To change the status of a materialized view, you can only convert between ENABLE and SUSPEND. The DISABLE state can be changed to SUSPEND or ENABLE only. 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.
- ENABLE: The materialized view is available.
- REFRESHING: The materialized view data is being refreshed and cannot be rewritten.
- DISABLE: The materialized view is disabled.
Example
Change the status of mv.default.mv1 to SUSPEND.
alter materialized view mv.default.mv1 set status SUSPEND;
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.