Materialized View Design
Materialized view design relies on similarity consolidation and finding common sets to avoid redundant work.
The system analyzes historical high-frequency similar SQL statements (based on Unique SQL ID), extracts common subqueries, and creates materialized views. The procedure is as follows:
- Analyze the top SQL statements.
1 2 3 4 5
SELECT unique_sql_id, count(*) as freq FROM pgxc_wlm_session_info WHERE query LIKE '%table_name%' GROUP BY unique_sql_id ORDER BY freq DESC;
- Summarize common calculations.
- Similar aggregations on the same table.
- Different queries on the same table.
- Common filter criteria combinations.
- Design materialized views.
- Basic and simple calculations are usd.
- The reuse frequency is maximized.
- The bottom-layer view is materialized preferentially.
Materialized View Design Principles
- The more basic the materialized view design, the higher the reuse frequency, and the greater the benefits.
- Avoid excessive materialization to reduce system load.
- Design appropriate refresh policies to balance performance and timeliness.
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