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.
Execution Plan Node Tree
Total Execution Time: 146.12 msCREATE INDEX idx_orders_status ON orders (status);
How to use
- Execute your query in PostgreSQL with EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) SELECT ... and copy the output.
- Paste the raw JSON or text query plan into the visualizer editor or click 'Load Sample Plan'.
- Inspect the interactive plan tree, node execution time percentages, and memory buffer hits/reads.
- Review the automated Index Advisor for recommended SQL CREATE INDEX statements to replace slow Sequential Scans.
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.
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
SQL Query Formatter & Minifier
Format and minify SQL queries across PostgreSQL, MySQL, and SQLite dialects.
JSON Formatter
Format, minify and validate JSON with precise line/column error messages.
Database Connection String Parser & Builder
Parse and rebuild PostgreSQL, MySQL, MongoDB, Redis, and RabbitMQ connection strings.