Skip to content
masterclass Buddy

PostgreSQL · Command

EXPLAIN ANALYZE

EXPLAIN shows the execution plan PostgreSQL chooses for a statement. EXPLAIN ANALYZE runs it and adds actual timing and row data.

Last updated

Syntax

EXPLAIN [ ( option [, ...] ) ] statement

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • ANALYZE
  • PREPARE
  • EXPLAIN EXECUTE
  • FORMAT JSON
  • FORMAT YAML

Source: PostgreSQL: Documentation: 18: EXPLAIN. Checked 2026-11-03.