Performance Tips
Table of Contents
1、Using EXPLAIN and explain Analyze
2、Statistics Used by the Planner
3、Controllingthe Planner with Explicit JOIN Clauses
4、Populatinga Database
4.1. Disable Autocommit,Turn off autocommit and just do one commit at the end
4.2. Use COPY to load all the rows in one command,instead of using a series of INSERT commands
4.3. Remove Indexes,the fastest way is to create the table,bulk load the
table's data using COPY,then create any indexes needed for the table
4.4. Increasemaintenance_work_mem
4.5. Increase checkpoint_segments
4.6. Run ANALYZE Afterwards,Running ANALYZE (or VACUUM ANALYZE) ensures that the
plannerhas up-to-date statistics about the table.