EXPLAIN
SQL - Language Statements
EXPLAIN
Shows statement execution details.
1998-09-01
EXPLAIN [ VERBOSE ] query
1998-09-01
Inputs
VERBOSE
Flag to show detailed query plan.
query
Any query.
1998-04-15
Outputs
NOTICE: QUERY PLAN:
Explicit query plan from the Postgres backend.
EXPLAIN
Flag sent after query plan is shown.
1998-04-15
Description
This command outputs details about the supplied query.
The default output is the computed query cost.
VERBOSE displays the full query plan and cost.
1998-04-15
Notes
Usage
To show a query plan for a simple query:
postgres=> explain select * from foo;
NOTICE: QUERY PLAN:
Seq Scan on foo (cost=0.00 size=0 width=4)
EXPLAIN
Compatibility
1998-09-01
SQL92
There is no EXPLAIN statement defined in SQL92.