Contents
EXPLAIN
An SQL command for showing the execution plan of a statement
EXPLAIN
is a utility command for showing the execution plan of a statement.
EXPLAIN
has always been present in PostgreSQL.
Change history
- PostgreSQL 15
- I/O timing for temporary file blocks tracked (efb0ef90)
- PostgreSQL 14
EXPLAIN VERBOSE
will now display the query identifier, ifcompute_query_id
is not disabled (commit 4f0b0966)
- PostgreSQL 13
WAL
option added (commit 33e05f89)
- PostgreSQL 12
SETTINGS
option added (commit ea569d64)
- PostgreSQL 11
- parallel workers' sort activity displayed in output (commit bf11e7ee)
- PostgreSQL 10
SUMMARY
option added (commit f9b1a0dd)
- PostgreSQL 9.4
- PostgreSQL 9.2
TIMING
option added (commit af7914c6)
- PostgreSQL 9.0
- PostgreSQL 8.4
VERBOSE
option now prints the target list of each plan node, rather than dumping the internal representation (commit 87a2f050)
- PostgreSQL 7.2
ANALYZE
option added (commit 89fa5518)
References
- PostgreSQL documentation: EXPLAIN
- PostgreSQL documentation: Using EXPLAIN
Useful links
- explain.depesz.com - an online tool for visualizing EXPLAIN output
- PostgreSQL Explain - a useful glossary from the pgMustard project