PostgreSQL EXPLAIN ANALYZE Plan Visualizer
Paste EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) or standard indented EXPLAIN text output to surface row-estimation skew, slow Seq Scans, disk spills, and inclusive vs. exclusive node timing.
Input & Options
Local JS Execution
Parsed Output & Diagnostics
Ready
Status
...
Generated Output
PostgreSQL Plan Bottleneck Reference
| Signal in EXPLAIN | Root Cause | Typical Fix |
|---|---|---|
| Actual Rows >> Plan Rows (>=10x) | Stale pg_statistic histogram or correlated columns | Run ANALYZE table; consider CREATE STATISTICS |
| Seq Scan + High Rows Removed by Filter | Missing composite/partial index on filter predicate | Add targeted B-tree or partial WHERE index |
| Temp Read/Written Blocks > 0 | Sort or Hash table exceeded work_mem | Increase session work_mem or pre-aggregate |
| Buffers shared read >> shared hit | Cold OS/shared_buffers cache | Right-size shared_buffers or reduce row width |
Parser Methodology & Privacy Guarantees
Recursively walks PostgreSQL EXPLAIN node trees locally in JavaScript, multiplying per-loop timings by Actual Loops and subtracting direct child node durations to isolate true exclusive CPU/I/O hotspots.
- Auto-detects JSON EXPLAIN format (`Plan` root) vs. indented ASCII `->` EXPLAIN text format.
- Computes Exclusive Time = Node Inclusive Total - Sum(Child Inclusive Totals), clamped >= 0 ms.
- Flags row-estimate skew (>= 5x ratio between Actual Rows and Plan Rows), large Seq Scans (> 1,000 rows), and Temp disk spills.
Scope & limitations: Text-format plans without ANALYZE show planner cost/rows estimates instead of wall-clock durations and buffer counters.
Frequently Asked Questions
How should I run EXPLAIN to get the richest visualization?
Run EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) SELECT ... on read-only queries, or wrap writes in BEGIN; EXPLAIN ...; ROLLBACK; so mutations do not persist.
What is the difference between Inclusive Time and Exclusive Time?
Inclusive time includes all child operators underneath a node (e.g., a Hash Join node covers scanning its inputs). Exclusive time subtracts direct child durations to pinpoint which specific step burned CPU or disk I/O.
Does this send my database schema or SQL query plan anywhere?
No. Parsing happens synchronously in your browser tab via local JavaScript with zero outbound requests.