Help Center > > Developer Guide> Tutorial: Using GDS to Import Data from a Remote Server> Step 7: Optimizing the Query Efficiency After Data Import

Step 7: Optimizing the Query Efficiency After Data Import

Updated at: Aug 06, 2020 GMT+08:00

After data is imported, run the ANALYZE statement to generate table statistics. The execution plan generator uses the statistics to generate the most 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 update 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.

  1. Run VACUUM FULL on the product_info table.

    VACUUM FULL product_info

  2. Update statistics of the product_info table.

    ANALYZE product_info;

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?

Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel