What Is SQL Explain Plan Viewer?
SQL Explain Plan Viewer is a free online tool by TechnSols that turns pasted EXPLAIN output from MySQL, PostgreSQL, or SQLite into a readable plan tree with costs and findings. It runs entirely in your browser: nothing is uploaded, nothing is stored on a server, and there is no account to make. Everything you type or paste stays on your own computer, and the result is ready to download when you are done.
A slow query is a mystery until you see its plan: the order the database reads the tables, the indexes it uses, and the rows it throws away. EXPLAIN prints that plan, but as a wall of indented text that is hard to read. A viewer draws the same plan as a tree, with the cost and row counts on each node, so the expensive step is visible at once. The PostgreSQL EXPLAIN guide explains what each node type means, from Seq Scan to Hash Join.
Paste the EXPLAIN output, and the tool detects the dialect from the text: MySQL table format, PostgreSQL indented text, or SQLite QUERY PLAN lines. The plan renders as a nested tree with cost, rows, and time on each node, and a findings list names the nodes worth looking at first: the sequential scans, the worst row estimates, and the sorts that spilled. The viewer never connects to a database and never runs your query. If the plan says a scan needs an index, the Database Index Inspector tool suggests which index to add.
How To Use SQL Explain Plan Viewer?
Here is how to use SQL Explain Plan Viewer online in three quick steps. Run EXPLAIN yourself, paste the output, and read the tree. If the query is still being written, the SQL Query Playground tool runs it against sample data first.
Step 1: Get The EXPLAIN Output
Run EXPLAIN on your query in your own database client: EXPLAIN SELECT in MySQL, EXPLAIN or EXPLAIN ANALYZE in PostgreSQL, or EXPLAIN QUERY PLAN in SQLite. Copy the whole output, including the header lines, and paste it into the box. The viewer only reads pasted text, so your database credentials and your data never leave your machine.
Step 2: Press Visualize Plan
Press Visualize Plan and the tool detects the dialect from the shape of the text: pipe-bordered rows mean MySQL, arrow-indented lines mean PostgreSQL, and SCAN or SEARCH lines mean SQLite. Each plan node becomes a box in a tree, with its operation, cost, estimated rows, and actual rows when the output includes them. The total cost and the slowest node are shown at the top.
Step 3: Read The Findings First
Read the findings list before the tree: it names the three nodes with the largest cost or time, flags sequential scans that discard most rows, and warns about sorts and hashes that spilled to disk. Each finding says what the node does and what to try next, such as an index or a rewritten condition. If a finding points at a missing index, the Database Index Inspector tool writes the CREATE INDEX statement.
The whole job takes a minute. A plan you can read is a slow query you can fix.
Why SQL Explain Plan Viewer?
A query that takes ten seconds has a reason, and the reason is in the plan: a full table scan, a nested loop over a million rows, a sort with no index to feed it. Without the plan, tuning is guessing: add an index, hope, measure, repeat. With the plan drawn as a tree, the expensive node is visible, the fix is obvious, and the guesswork stops. A plan is about tables, and the Database Schema Visualizer tool shows how those tables connect.
The Expensive Step Lights Up
A text plan spreads the cost across dozens of lines, and the big number hides in the middle. The tree puts the cost on each node and ranks the nodes, so the step that eats the time is at the top of the findings list. You fix the one node that matters instead of tuning the whole query at random.
Estimates Against Reality
When EXPLAIN ANALYZE ran, the plan holds both the estimate and the actual rows, and the viewer shows them side by side. A node the planner thought would return ten rows but returned ten thousand is a statistics problem, not an index problem, and the fix is ANALYZE, not a new index. The comparison is what turns a plan into a diagnosis.
Three Dialects, One Reading
MySQL, PostgreSQL, and SQLite print plans in three different formats, and learning all three takes time. The viewer reads all three and draws the same tree, so a developer who works across databases reads every plan the same way. The dialect detection is automatic, so there is nothing to configure before pasting.
The MySQL EXPLAIN reference documents the columns in the MySQL table format: type, key, rows, and Extra, including the Using filesort and Using temporary warnings the viewer flags. A plan is only as useful as the reader’s grasp of those columns.
What Can You Do With SQL Explain Plan Viewer?
The viewer fits any job that starts with a slow query and ends with a reason.
Find Why A Report Is Slow
A report that took two seconds now takes forty, and nobody changed the query. Paste the EXPLAIN output and look for the node that changed: a scan that used to be an index lookup, or a join that now loops over ten times the rows. The Database Index Inspector tool checks the same schema for the index the plan is missing.
Check A Query Before Release
A new feature ships with a new query, and the query will run a thousand times a day. Run EXPLAIN in staging, paste the plan, and check the findings before the release: a sequential scan on a table that will grow is a problem to fix now, not after the launch. The SQL Query Playground tool runs the query itself against sample data first.
Teach Query Performance
Students learn what an index does by seeing a plan change: run EXPLAIN before the index, then after, and the tree shows the scan turning into a lookup with the cost dropping. The viewer makes that before-and-after visible in one picture, which is how the lesson sticks.
Quality And Settings
The viewer is pure JavaScript with three text parsers, one per dialect, and no library. Plans are rendered as nested lists with cost, rows, and time on each node, and findings are computed from the parsed tree. If the plan needs realistic rows to be meaningful, the Database Seed Data tool builds them.
- MySQL table format: id, select type, table, access type, key, rows, and Extra.
- PostgreSQL text format: arrow-indented nodes with cost, rows, width, and actual time.
- SQLite QUERY PLAN: SCAN and SEARCH lines with table, index, and covering notes.
- Findings list ranks the costliest nodes and flags scans, bad estimates, and spills.
- Plan summary downloads as a text report with the findings and the node list.
There are no settings beyond the paste box and the Visualize button, because the dialect is detected from the text. Paste the plan honestly, read the findings, and fix the node that costs the most.
How SQL Explain Plan Viewer Works
The viewer looks at the pasted text and picks a parser: lines starting with a pipe and containing select_type mean MySQL, lines with an arrow and a cost mean PostgreSQL, and lines starting with SCAN or SEARCH mean SQLite. The MySQL parser splits the table rows on pipes and reads the type, key, rows, and Extra columns. The PostgreSQL parser reads the indentation depth to rebuild the tree, and takes the cost, rows, and actual time from each line. The SQLite parser reads each QUERY PLAN line as a leaf node with its access method. The SQL Query Playground tool runs the same queries that produce these plans, against an in-browser SQLite database.
Two limits are worth knowing. The viewer reads pasted text only: it cannot connect to your database, it cannot run EXPLAIN for you, and a plan describes one execution only, so the same query can plan differently with different data or parameters. And only the text formats are read: MySQL EXPLAIN FORMAT=JSON and PostgreSQL FORMAT JSON are not parsed, so use the plain text output instead.
Privacy
Everything you type stays in your browser. SQL Explain Plan Viewer runs on your own computer, and nothing you enter is uploaded to a server, stored, or shared with anyone. Closing the tab clears the form, so your work never leaves your device.
Because no account is needed, there is no name, email, or history tied to what you check. Closing the tab ends the session, and the browser clears the input from memory. That is the same protection on every tool here: your work stays yours, and nothing about it is kept, shared, or sold.
Tips
A few habits make SQL Explain Plan Viewer work smoother, whether you are using it once or every day.
- Use EXPLAIN ANALYZE in PostgreSQL when you need real timings, not just estimates.
- Copy the whole output, headers included: the parser uses them to detect the dialect.
- Fix the top finding first, then re-run EXPLAIN and compare the new plan.
- A Seq Scan on a small table is fine; the same scan on a million-row table is not.
- Save the plan text with the ticket, so the fix can be checked against the same plan.
When the plan is fixed, download the text report and attach it to the ticket, so the before and after are both on record. If the fix is a new index, the Database Index Inspector tool writes the exact CREATE INDEX statement to run.
More Tools For The Same Job
These tools handle the same kinds of jobs: working with databases, SQL, and the data that lives in them.
- Database Index Inspector: checks pasted DDL for missing index suggestions.
- SQL Query Playground: runs SQL against an in-browser SQLite database.
- Database Schema Visualizer: draws tables and foreign keys from pasted DDL.
- SQL Query History Viewer: finds any query you ran before, with search and re-run.
- SQL Query Library Manager: saves named queries locally and exports them as JSON.
- Database Seed Data Generator: builds INSERT statements with fake rows for any table.
- Database Documentation Generator: turns pasted DDL into tables, columns, and relations docs.
- MySQL to PostgreSQL Translator: converts MySQL SQL into PostgreSQL SQL.
- SQLite to SQL Dump Converter: exports a SQLite database as SQL text.
- JSON to SQL Insert Converter: turns JSON rows into INSERT statements.
FAQ
Common questions about SQL Explain Plan Viewer, answered plainly.
Is SQL Explain Plan Viewer by TechnSols Free?
Yes, SQL Explain Plan Viewer by TechnSols is completely free to use, with no account, no sign-up, and no usage limit. You can use it as often as you like, and everything you type stays in your browser, so nothing is uploaded or stored anywhere.
Which EXPLAIN Formats Can It Read?
The viewer reads three text formats: MySQL plain EXPLAIN table output, PostgreSQL plain text EXPLAIN and EXPLAIN ANALYZE, and SQLite EXPLAIN QUERY PLAN. JSON formats such as MySQL EXPLAIN FORMAT=JSON and PostgreSQL FORMAT JSON are not parsed. Paste the plain text output from your database client for the best result.
Does It Connect To My Database?
No, the viewer never connects to any database and never runs your query. You run EXPLAIN yourself in your own client, then paste the output here. The parsing happens entirely in your browser, so your table names, your query, and your plan never leave the tab.
What Does A Seq Scan Finding Mean?
A Seq Scan finding means the database read the whole table instead of using an index. On a small table that is fine and fast, but on a large table it is usually the slow step. The finding says how many rows the scan returned, so you can judge whether it matters before adding an index.
Why Do Estimated And Actual Rows Differ?
The planner estimates rows from table statistics, and stale statistics make the estimate wrong. A big gap between estimated and actual rows points at outdated statistics, not at a missing index. Run ANALYZE on the table to refresh the statistics, then re-run EXPLAIN and compare the new plan.
Open SQL Explain Plan Viewer and try it with the sample first, then bring your own work. It is free, it runs entirely in your browser, and nothing you type is uploaded or stored.