EXPLAIN visualizer
The EXPLAIN visualizer turns the textual query plan into a tree of nodes you can read, compare, and color by metric. Replaces hand-reading EXPLAIN (ANALYZE, BUFFERS) and third-party services.
Run
| Action |
Shortcut |
| EXPLAIN (no execution, plan estimate) |
⌘+E |
| EXPLAIN ANALYZE (executes for real) |
⌘+Shift+E |
On a production connection, EXPLAIN ANALYZE actually runs the query — meaning DELETE or UPDATE will execute. Use plain EXPLAIN (no ANALYZE) for estimates, or wrap in BEGIN; ... ROLLBACK;.
After running, ide99 opens a Plan tab with the node tree.
The plan tree
Nodes are stacked top to bottom: root (the last operation) on top, leaves (Seq Scan, Index Scan) at the bottom. Each node shows:
- Type:
Seq Scan, Hash Join, Sort, Aggregate, Limit, etc.
- Table name / condition (if applicable)
- Duration (
Actual Total Time)
- A bar indicator proportional to duration (you visually see the "hot" nodes)
Click a node — the side panel on the right opens with all metrics: cost (Startup Cost / Total Cost), rows (Plan Rows / Actual Rows), buffers (Shared Hit / Shared Read), disk read/write times.
Heatmap
Top-right of the diagram — a switch: none · duration · rows · cost. Changes node color and fill:
- none — neutral (default).
- duration — nodes shaded by
Actual Total Time relative to the slowest. Red = your bottleneck.
- rows — by
Actual Rows × Loops. Shows where Postgres churns through millions of rows.
- cost — by
Total Cost. Useful for comparing "expensive" estimates.
Most common pattern: switch to duration, find the single red node — that's your problem.
Auto-insights
Above the diagram — a collapsible "Insights" block. If ide99 spots typical issues, they go here:
Seq Scan on a table with > 100K rows when a suitable index is missing
Sort spilling to Disk (work_mem overflowed)
Bitmap Heap Scan with a recheck mismatch (stale stats)
Hash Join with Batches > 1 (hash table doesn't fit in work_mem)
Nested Loop with a large outer relation (often a planner mistake, helped by ANALYZE)
- Bad row estimate:
Actual Rows / Plan Rows > 100× (hint at stale stats)
Each insight is clickable — jumps to the specific node.
Plan diff (before and after an index)
One of the most useful modes: compare two plans side by side.
- Run
EXPLAIN ANALYZE on the current query → plan A is saved.
- Add an index or rewrite the query.
- Run
EXPLAIN ANALYZE again → a "Compare to previous" button appears.
- A side-by-side opens: plan A on the left, plan B on the right. Nodes that got faster — green; slower — red.
Recent Plans
ide99 stores ~200 recent plans per connection locally. Open via the History icon in the EXPLAIN tab header or Cmd+P in the visualizer.
The list shows: query, duration, run time, node types. Search by query text or table name. Double-click loads the plan; you can diff against the current one.
If your connection has Exclude from recent plans on — that specific connection won't be logged. Useful for prod with PII.
Export
The Export button in the tab header — downloads a JSON of the plan. You can open it in pev2.dev, share on a forum, attach to a bug report.
Tip: what to read first in a plan
- Make sure Heatmap =
duration. Without it you read the plan blindly.
- Find the red node. That's your bottleneck — usually
Seq Scan or Sort.
- Look at Plan Rows vs Actual Rows. If they differ by 100×+ — stats are stale, run
ANALYZE <table>.
- Check the Insights panel. Often it already tells you what to do.
Next