A free online query plan viewer for eight databases

Paste a SQL Server, PostgreSQL, MySQL, MariaDB, SQLite, DuckDB, ClickHouse or Oracle plan and get ranked findings, a tree and a diagram. Runs in your browser.

By

Someone pastes an execution plan into a chat and asks why the query is slow. If it is a PostgreSQL plan you squint at the JSON. If it is SQL Server, it is a few hundred lines of ShowPlan XML and you go looking for a machine with SSMS on it. If it came from MySQL, DuckDB or Oracle, each of those is a different shape again. Most online plan viewers handle one engine, and most of them want you to upload the plan to their server first, which is awkward when the plan contains your SQL, your table names and sometimes the parameter values.

So we put the plan reader from SQLly on the website as a free tool: the query plan viewer. Paste a plan, or open or drop a .sqlplan, .json or .txt file, and you get a ranked list of findings, an operator tree and a plan diagram. There is no sign-up, and the plan never leaves your browser tab.

What it reads

Eight engines, and the format is detected automatically (there is also a picker if you want to force one):

  • SQL Server and Azure SQL: ShowPlan XML, which is what SET STATISTICS XML, SET SHOWPLAN_XML and a saved .sqlplan file all contain. Multi-statement batches get a statement switcher.
  • PostgreSQL: EXPLAIN (FORMAT JSON), with or without ANALYZE.
  • MySQL: EXPLAIN FORMAT=JSON and the EXPLAIN ANALYZE tree.
  • MariaDB: EXPLAIN FORMAT=JSON and ANALYZE FORMAT=JSON.
  • SQLite: EXPLAIN QUERY PLAN, either the sqlite3 shell's tree or the raw id | parent | notused | detail rows.
  • DuckDB: EXPLAIN (FORMAT JSON), including the ANALYZE form.
  • ClickHouse: EXPLAIN json = 1, ideally with indexes = 1 so it can see how much each index pruned.
  • Oracle: DBMS_XPLAN output, including the Predicate Information section.

It is forgiving about how the text got to you. Output copied out of psql keeps its QUERY PLAN header, dashes, + continuations and (1 row) footer, and the viewer strips them. The same goes for the mysql client's table borders, \G row banners and "1 row in set" lines, and for Markdown code fences if the plan came out of a ticket or a chat message.

It is also honest about what it cannot read. If you paste PostgreSQL's default text EXPLAIN, it tells you to rerun with FORMAT JSON rather than guessing at the indentation. SQL Server's text showplan gets pointed at SET STATISTICS XML. MySQL's newer version 2 JSON layout gets a note to run SET explain_json_format_version = 1 first.

A worked example: SQL Server

The page has a sample picker with real captures from each engine against a small shop schema. The SQL Server one is an actual plan of a three-statement batch. The first statement looks harmless:

DECLARE @email nvarchar(200) = N'[email protected]';

SELECT c.CustomerID, c.Email, o.OrderID, o.OrderDate, o.Status, o.Total
FROM dbo.Customers AS c
JOIN dbo.Orders AS o ON o.CustomerID = c.CustomerID
WHERE c.Email = @email
ORDER BY o.OrderDate DESC;

The findings for that statement, in the order the viewer ranks them:

  • Critical: add an index on dbo.Orders (CustomerID). SQL Server's own missing-index suggestion, with its estimated impact (91.8%) and a ready-to-review statement: CREATE NONCLUSTERED INDEX [IX_Orders_CustomerID] ON [dbo].[Orders] ([CustomerID]) INCLUDE ([OrderDate], [Status], [Total]); You can copy it straight out of the finding.
  • Warning: a full scan of dbo.Orders, the clustered index scan carrying 92% of the statement's cost.
  • Warning: implicit conversion. The plan contains CONVERT_IMPLICIT(nvarchar(200),[c].[Email],0)=[@email]. The Email column is not nvarchar, so SQL Server converts every row's value to match the parameter, and that blocks a seek on the Email index. The fix is to declare the parameter with the column's type.
  • Info: excessive memory grant on the Sort. It requested 67,776 KB and used 1,360 KB. Memory reserved and not used is memory other queries were waiting for.

The other two statements in the batch get their own findings: a date-range aggregate whose scan was estimated at 180K rows and read 4,931 (a 37× miss), and a TOP (20) query with a key lookup and a row goal, both marked as informational because that is usually the plan you want for a top-N query.

Each finding names the operator it belongs to, explains why it hurts and suggests a next step. Below the tool, the page has a longer write-up of every finding type, from spills to tempdb to cross joins with no join predicate.

A worked example: PostgreSQL

The PostgreSQL sample is EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) of this:

SELECT c.email, o.id, o.order_date, o.total
FROM customers c
JOIN orders o ON o.customer_id = c.id
WHERE lower(c.email) = '[email protected]'
ORDER BY o.order_date DESC;

The tree view tells the story faster than the JSON does. Each row shows the operator's share of cost, estimated rows and actual rows side by side, and highlights any operator where the two differ by 10× or more. Here almost everything is highlighted. The sequential scan on customers was estimated at 250 rows and returned 1, and the error carries up through the Hash, the Hash Join (1,250 estimated, 4 actual), the Sort and the Gather Merge (2,500 estimated, 12 actual). Underneath that, a sequential scan on orders reads 200K rows per process and takes 68% of the cost.

The viewer flags both scans and every estimate miss. The reason behind the misses is worth knowing: customers has 50,000 rows, and PostgreSQL has no statistics on lower(email), so it falls back to a default selectivity of 0.5% for an equality, which is exactly 250 rows. An expression index on lower(email) fixes both problems at once. It turns the scan into an index lookup, and ANALYZE collects statistics on indexed expressions, so the estimate becomes real too.

Engines that report less

The viewer only shows what the engine reports. SQLite's EXPLAIN QUERY PLAN has no costs or row estimates, just the steps, which is still enough to spot a SCAN that should be a SEARCH. ClickHouse has no cost model, and DuckDB has no cost units, so an actual DuckDB plan is shaded by the time each operator took instead. Actual row counts only appear when the plan was captured with runtime statistics; an estimated plan has nothing to compare against.

Under the hood

The viewer is not a JavaScript rewrite of the desktop feature. It is the same Rust code: the parsers, the findings engine, the operator tree and the diagram layout from the plans module in SQLly's sqlly-intel crate, compiled to WebAssembly. A thin wasm-bindgen shell turns a pasted plan into one JSON document and the page renders it. The format sniffing and the psql/mysql cleanup live in the same shared module that backs Open Plan and Paste Plan in the app, so a plan reads the same on the website as it does on your desktop.

That is also why nothing is uploaded. The page downloads the wasm bundle once, and from then on your plan is parsed and analyzed inside the tab. Files you open are read with the browser's file reader on your machine. There is no server round trip to log.

What the desktop app adds

The web viewer covers reading a plan someone already captured. The plan pane in SQLly runs the same analysis and adds the parts that need a live connection: capturing an actual or estimated plan from the editor with one shortcut, remembering your EXPLAIN options per connection, keeping a history of captures in each query tab and comparing any two of them to show which operators regressed, improved, appeared or disappeared. A suggested index opens in a new query tab instead of going through the clipboard.

If you want the background on capturing plans in the first place, including which commands actually execute your UPDATE, we covered that in Reading query plans in PostgreSQL, SQL Server, MySQL and SQLite. Otherwise, grab a slow query's plan and paste it into the viewer, or download SQLly and press Explain in the editor.