Step 6: Improving Query Efficiency After Data Import
After data is imported, run the ANALYZE statement to generate table statistics. The statistics data is useful when you run the planner, which provides you with an efficient query execution plan.
If a large number of rows were updated or deleted during import, run VACUUM FULL before ANALYZE. A large number of updates and delete operations generate huge disk page fragments, which reduces the query efficiency. VACUUM FULL can restore disk page fragments and return them to the OS.
- Run VACUUM FULL on the product_info table.
1
openGauss=# VACUUM FULL product_info;
VACUUM
- Update statistics in the product_info table.
1
openGauss=# ANALYZE product_info;
ANALYZE
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