PostgreSQL EXPLAIN Plan Visualizer
Raw EXPLAIN ANALYZE output is hard to read. Paste it here — plain text or FORMAT JSON — and get an indented plan tree with each node's exclusive time, share of total runtime, planned vs actual rows, and automatic warnings for sequential scans, stale statistics and sorts that spill to disk. Everything runs in your browser; no plan ever leaves your machine.
Do more than postgresql explain plan visualizer — meet Chat2DB
Chat2DB is an AI-powered SQL client for Windows, macOS and Linux. Write SQL in natural language, format and optimize queries automatically, and manage MySQL, PostgreSQL, Oracle and 20+ other databases in one workspace.
How to use
- Run EXPLAIN (ANALYZE, BUFFERS) your_query; in psql, or EXPLAIN (ANALYZE, FORMAT JSON) for the most accurate timings.
- Paste the full output into the box below.
- Click Visualize to see the plan tree, the slowest node and the tuning warnings.
Frequently asked questions
What is the difference between EXPLAIN and EXPLAIN ANALYZE?
EXPLAIN only shows the planner's estimated plan and costs, without running the query. EXPLAIN ANALYZE actually executes the query and reports real timings and row counts, which is what you need to find the true bottleneck. Note that ANALYZE runs the statement, so wrap INSERT, UPDATE or DELETE in a transaction you roll back.
Why do planned rows and actual rows differ so much?
A large gap means the planner's statistics are stale or the column correlation is unusual, so it picks the wrong join strategy. Run ANALYZE on the table, and for skewed columns raise the statistics target with ALTER TABLE ... ALTER COLUMN ... SET STATISTICS 500, then ANALYZE again.
Is a sequential scan always a problem?
No. On a small table, or when a query genuinely reads most rows, a sequential scan is the cheapest option. It is only worth fixing when a scan reads many rows and then discards most of them through a filter — that is the pattern this visualizer flags.
