Automatic Rewriting
Automatic rewriting of materialized views can match the execution plan during the logical plan generation phase and automatically rewrite it into a materialized view query statement.
- Automatic rewriting authorization
During automatic rewriting, permissions on all source tables and the materialized view must be verified simultaneously for the rewriting to occur.
- Exact match (hash match)
The hash value of the logical execution plan is stored in the table properties. The hash value is directly used for comparison to determine if there is a match. If a match is found, the query statement is rewritten.
- Fuzzy match (plan match)
The view's SQL statement is retrieved and re-parsed to generate a logical plan. All nodes of the execution plan are compared in detail in the background. If the execution plan is a subtree of the materialized view's execution plan, a match is found, and the query statement is rewritten.
Compared to exact match, fuzzy match can cover a wider range. Even if the execution plans are not identical, there is a possibility of a match.
What is your overall rating for this page?
Thank 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