opyeb SQLPlan

PostgreSQL · MySQL · query tuning

See where the query actually spends its time.

Paste a PostgreSQL EXPLAIN (ANALYZE, BUFFERS) or MySQL EXPLAIN ANALYZE tree. SQLPlan rebuilds the plan as a tree, separates each node's own time from its children's, flags sequential scans, nested-loop rescans and disk spills, proposes indexes, and formats or lints the SQL. Nothing leaves this page.

Engine PostgreSQL and MySQL text plans Local Parsed in page memory Store No history Net No network calls

Execution plan

Text format only. The plan is parsed locally; no database connection is made.

Summary

Execution—
Planning—
Nodes—
Seq scans—
Worst row estimate—
Disk spill—

Plan tree

NodeSelf timeRows (act / est)Loops
Paste a plan and press Analyze.

The bar is self time as a share of execution time. Select a row to see filters, buffers and sort details.

SQL

SQL formatter and linter

Formatting is whitespace and keyword case only; it does not change semantics.

Formatted SQL

—

Method

What the analyzer measures

01

Self time, not just total

A node's total time includes its children. SQLPlan subtracts the children (multiplied by their loops) so the bar shows the time spent in that node itself, which is where an index or a rewrite actually helps.

02

Estimates against reality

Each row shows actual rows per loop next to the planner's estimate. A ratio above ten usually means stale statistics, a correlation the planner cannot see, or a predicate it cannot estimate — and every join above it inherits the error.

03

Disk is the expensive part

Sorts that spill to external merge, hash batches above one, and temp blocks read or written are flagged first. They turn a memory operation into I/O and are often fixed by an index, a smaller row width or a work_mem change.

Guides

Start with these guides