An EXPLAIN plan visualizer that finds the slow part.
Paste a Postgres or MySQL EXPLAIN plan in JSON and LetDraw's EXPLAIN plan visualizer draws it as a tree, one box per plan node with its cost, rows and timing. A heat map colours each node by the time or cost it adds itself, so the slow query step lights up red.
From query plan to picture in four steps
Run EXPLAIN as JSON, paste it, and read the tree instead of the wall of text.
Get the plan as JSON
In Postgres run EXPLAIN (FORMAT JSON) before your query, or EXPLAIN (ANALYZE, FORMAT JSON) for real timings. In MySQL use EXPLAIN FORMAT=JSON.
Paste it into Generate from Code
Open Generate from Code (a Pro feature) from the More tools menu and paste. The plan is recognised automatically and a live preview appears.
Read the heat map
Green nodes add little, red nodes add the most. Lay the tree out top-down or left-right, whichever reads better.
Annotate and share
Insert the tree, add a note on the red box with your fix, then share a link or export as PNG, SVG or PDF.
Heat-mapped by self time, not by totals
Postgres reports cost and time cumulatively, so the root of a plan always looks the most expensive. This EXPLAIN plan visualizer subtracts each node's children and colours by what the node adds itself, from green through amber to red. Each box shows the node type and the table, index or function it works on, plus cost, rows and, with ANALYZE, the time in milliseconds across all loops.
- Postgres EXPLAIN in JSON format, with or without ANALYZE
- MySQL EXPLAIN FORMAT=JSON, showing each table with its access type, cost and rows
- Runs in your browser, so the plan and your table names stay on your machine
Make slow query plans easy to discuss
A raw plan is something one person deciphers alone; a coloured tree is something the whole team understands.
Slow query triage
Find the sequential scan or the expensive join in seconds instead of scrolling through nested JSON.
Before and after an index
Paste both plans on one canvas and show exactly which node turned from red to green.
Code reviews
Attach the plan of a new query to the pull request so reviewers see its cost, not just its SQL.
Incident write-ups
Export the heat-mapped tree as PNG, SVG or PDF and put the culprit right in the post-mortem.
Developer and DBA handoffs
Share one board where both sides comment on the same plan nodes in real time.
Learning query planners
See how joins, scans and sorts nest inside each other and why the planner chose them.
EXPLAIN plan visualizer FAQ
Which EXPLAIN output can I paste?
Should I use EXPLAIN ANALYZE?
Does my query plan leave the browser?
Is it free?
More ways to diagram from code
Let the bottleneck introduce itself.
Open LetDraw, paste your EXPLAIN plan as JSON and see where the query spends its time.