--- title: "Performance Tips" id: performance-tips pg_version: "20devel" --- # Performance Tips ## Table of Contents - [14.1. Using `EXPLAIN`](using-explain.md) - [14.1.1. `EXPLAIN` Basics](using-explain.md#using-explain-basics) - [14.1.2. `EXPLAIN ANALYZE`](using-explain.md#using-explain-analyze) - [14.1.3. Caveats](using-explain.md#using-explain-caveats) - [14.2. Statistics Used by the Planner](planner-stats.md) - [14.2.1. Single-Column Statistics](planner-stats.md#planner-stats-single-column) - [14.2.2. Extended Statistics](planner-stats.md#planner-stats-extended) - [14.3. Controlling the Planner with Explicit `JOIN` Clauses](explicit-joins.md) - [14.4. Populating a Database](populate.md) - [14.4.1. Disable Autocommit](populate.md#disable-autocommit) - [14.4.2. Use `COPY`](populate.md#populate-copy-from) - [14.4.3. Remove Indexes](populate.md#populate-rm-indexes) - [14.4.4. Remove Foreign Key Constraints](populate.md#populate-rm-fkeys) - [14.4.5. Increase `maintenance_work_mem`](populate.md#populate-work-mem) - [14.4.6. Increase `max_wal_size`](populate.md#populate-max-wal-size) - [14.4.7. Disable WAL Archival and Streaming Replication](populate.md#populate-pitr) - [14.4.8. Run `ANALYZE` Afterwards](populate.md#populate-analyze) - [14.4.9. Some Notes about pg_dump](populate.md#populate-pg-dump) - [14.5. Non-Durable Settings](non-durability.md) Query performance can be affected by many things. Some of these can be controlled 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.