ALTER MATERIALIZED VIEW
Function
Modifies the properties of a materialized view.
The materialized view feature is only supported by clusters 8.3.0 or later versions. If you want to use this feature, reach out to technical support for assistance.
Precautions
None
Syntax
ALTER MATERIALIZED VIEW [ IF EXISTS ] { materialized_view_name } [ ENABLE | DISABLE ] QUERY REWRITE; ALTER MATERIALIZED VIEW [ IF EXISTS ] { materialized_view_name } REFRESH [ COMPLETE ] [ ON DEMAND ] [ [ START WITH (timestamptz) ] | [ EVERY (interval) ] ]; ALTER MATERIALIZED VIEW { materialized_view_name } OWNER TO new_owner;
Parameter Description
- ENABLE | DISABLE QUERY REWRITE
Indicates whether to enable query rewriting for a materialized view.
After enabling query rewriting for the materialized view, refresh the materialized view to ensure the data is up-to-date.
- REFRESH [ COMPLETE ] [ ON DEMAND ] [ [ START WITH (timestamptz) ] | [EVERY (interval)] ]
Modifies the method of refreshing a materialized view.
- OWNER TO new_owner
Examples
Enables query rewriting for a materialized view.
1 2 3 |
ALTER MATERIALIZED VIEW mv1 ENABLE QUERY REWRITE; NOTICE: REFRESH MATERIALIZED VIEW should be executed to enable query rewrite. ALTER MATERIALIZED VIEW |
Helpful Links
CREATE MATERIALIZED VIEW, DROP MATERIALIZED VIEW, REFRESH MATERIALIZED VIEW
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot