Visualise EXPLAIN

Turn SQL EXPLAIN output into a readable plan tree with costs and row estimates.

freeworks offlinenothing uploaded
ToolEXPLAIN Visualizer
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Plan text is parsed into nested scans, joins, sorts, aggregates, costs, estimated rows, and optional actual timing nodes. Indentation and parent-child relationships become visual tree levels.

  • Estimated plans avoid executing the query.
  • Actual timings require EXPLAIN ANALYZE.

Worked example

PostgreSQL JSON EXPLAIN
Visualize a PostgreSQL query execution plan from JSON format output
Input
											[{"Plan":{"Node Type":"Seq Scan","Relation Name":"users","Startup Cost":0.00,"Total Cost":35.50,"Plan Rows":2550,"Plan Width":36,"Filter":"(active = true)"}}]
										
Output
												Seq Scan (on users; Filter: (active = true)) [cost=0..35.5] [rows=2550]
											

When to use this

Slow-query investigations, DBA index reviews, and performance reports visualize plans.

Edge cases

  • Stale statistics can make estimated rows inaccurate.
  • EXPLAIN ANALYZE executes the statement and can cause write side effects.
  • A plan from one data distribution may not generalize.

References