Chapter 13. Performance Tips

Table of Contents
13.1. Using EXPLAIN
13.2. Statistics Used by the Planner
13.3. Controlling the Planner with Explicit JOIN Clauses
13.4. Populating a Database
13.4.1. Disable Autocommit
13.4.2. Use COPY
13.4.3. Remove Indexes
13.4.4. Remove Foreign Key Constraints
13.4.5. Increase maintenance_work_mem
13.4.6. Increase checkpoint_segments
13.4.7. Run ANALYZE Afterwards
13.4.8. Some Notes About pg_dump

Query performance can be affected by many things. Some of these can be manipulated by the user, while others are fundamental to the underlying design of the system. This chapter provides some hints about understanding and tuning PostgreSQL performance.