SQL EXPLAIN Plan Visualizer
Paste PostgreSQL or MySQL EXPLAIN output and see the plan as a tree, with the most expensive and slowest steps shaded and common problems pointed out.
- Free
- No sign-up
- Works on any device
About SQL EXPLAIN Plan Visualizer
A query plan is a tree, but EXPLAIN prints it as indented text. Paste the output from PostgreSQL (text or FORMAT JSON), or from MySQL 8 (EXPLAIN FORMAT=TREE or EXPLAIN ANALYZE) and the page draws the tree. It subtracts the cost or time of the children to show what each step spends itself, shades the biggest shares and ranks the steps. It also flags sequential scans on large tables, row estimates that are far from the actual rows, disk sorts and nodes that run thousands of times.
How to use SQL EXPLAIN Plan Visualizer
- Run EXPLAIN (ANALYZE) your_query in PostgreSQL, or EXPLAIN ANALYZE in MySQL 8, and copy the whole output.
- Paste it into the box. The tree appears at once; JSON output from PostgreSQL works too.
- Start with the most expensive step, check the estimated and actual rows, and read the observations for suggestions.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
Also known as
Frequently asked questions
What is the difference between EXPLAIN and EXPLAIN ANALYZE?
EXPLAIN shows the plan the planner expects with estimated costs. EXPLAIN ANALYZE also runs the query and adds the real times and row counts, so it can change data for INSERT, UPDATE and DELETE.
What does the cost number mean?
Cost is an arbitrary unit the planner uses to compare plans, based on page reads and CPU work. It is not milliseconds, so compare the steps of one plan, not plans from different servers.
Why are estimated and actual rows so different?
The planner relies on table statistics. When they are old or the data is skewed, the estimate can be wrong by a large factor, and then a poor join order or scan can be chosen. Running ANALYZE on the table often helps.
Is SQL EXPLAIN Plan Visualizer free?
Yes. SQL EXPLAIN Plan Visualizer on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.