Moayyad Faris
JSON and Data

Processed locally in your browser — not uploaded

PostgreSQL EXPLAIN Plan Visualizer & Index Advisor

Client-side visualizer and optimization tool for PostgreSQL execution plans. Parses raw EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) outputs, renders interactive tree diagrams, highlights execution time percentages per node, identifies costly Sequential Scans (Seq Scan), and generates automated CREATE INDEX SQL recommendations.

📊 Postgres EXPLAIN Query Plan Visualizer

Execution Plan Node Tree

Total Execution Time: 146.12 ms
Limit
Rows: 50Time: 145.82 ms (100%)
Sort
Rows: 50Time: 145.20 ms (99%)
Seq Scanon orders
Rows: 45,000Time: 138.50 ms (95%)
Filter: (status = 'pending'::text)
⚠️ Sequential Scan on table "orders". Consider adding an index for "(status = 'pending'::text)".
💡 Index Advisor Recommendations (1)
CREATE INDEX idx_orders_status ON orders (status);
01

How to use

  1. Execute your query in PostgreSQL with EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) SELECT ... and copy the output.
  2. Paste the raw JSON or text query plan into the visualizer editor or click 'Load Sample Plan'.
  3. Inspect the interactive plan tree, node execution time percentages, and memory buffer hits/reads.
  4. Review the automated Index Advisor for recommended SQL CREATE INDEX statements to replace slow Sequential Scans.
02

Understanding the output

The tool parses PostgreSQL execution plan trees (JSON array format). It calculates cumulative vs self node execution cost (ms), identifies high-impact Sequential Scans on large tables, highlights buffer cache misses, and generates index recommendations.

03

Common issues & tips

  • For most detailed plan analysis including exact execution times and buffer cache statistics, run EXPLAIN with (ANALYZE, BUFFERS, FORMAT JSON).
  • Be careful running EXPLAIN ANALYZE on INSERT, UPDATE, or DELETE queries in production — EXPLAIN ANALYZE actually executes the query!
  • Sequential Scans (Seq Scan) are normal for small tables (<1,000 rows) where reading the entire table is faster than an index lookup.

Frequently asked questions

How do I get the JSON format execution plan in PostgreSQL?
Run your SQL query prefixed with: EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) SELECT ... in psql or your database client, then copy the JSON output.
Are Sequential Scans always bad for query performance?
No. For small tables (under 1,000 rows), a Sequential Scan is often faster than an Index Scan because reading sequential disk pages requires fewer I/O operations than loading index pages.
Is my query plan or data uploaded to any external server?
No. Parsing, execution tree rendering, and index recommendation happen 100% locally in your browser. Database schemas and queries never leave your machine.

Related tools