SQL Query Execution Plan & AST Visualizer
Visualize PostgreSQL & MySQL EXPLAIN (ANALYZE, BUFFERS) execution plan trees, detect costly sequential scans, hash join bottlenecks, and get index optimization suggestions.
The SQL Query Execution Plan & AST Visualizer is a fast, accurate Developer Tools utility designed to visualize postgresql & mysql explain (analyze, buffers) execution plan trees, detect costly sequential scans, hash join bottlenecks, and get index optimization suggestions. entirely in your browser with zero server data storage.
SQL Query Execution Plan & AST Visualizer
Visualize PostgreSQL & MySQL EXPLAIN (ANALYZE, BUFFERS) trees, detect costly sequential scans and nested loops, and get index suggestions.
Visual Plan Execution Tree
Optimization Checklist (1)
Full table scan detected without an index. The database reads every disk block to find matching rows.
Relational Database Query Planner & Execution Cost Mechanics
Modern RDBMS query optimizers (such as PostgreSQL Cost-Based Optimizer and MySQL Hypergraph Optimizer) transform declarative SQL into an optimal execution tree by evaluating combinatorial scan methods, join algorithms, and sorting strategies.
Core Execution Node Types
- Seq Scan (Sequential Scan): Reads every heap page sequentially. Fast for small tables (<100 rows), but catastrophic for millions of records.
- Index Scan / Index Only Scan: Traverses B-Tree index pages. Index Only Scans avoid visiting the table heap entirely if all required columns reside in the index.
- Hash Join: Constructs an in-memory hash table on the smaller inner relation, then probes it with rows from the outer relation.
- Nested Loop: Loops over every row of the outer table and performs a lookup on the inner table. Optimal when outer row count is small and inner table is indexed.
Share This Tool
Help your team and fellow developers save time with free, private client-side utilities.
Systems & Security Engineers • Applied Cryptography & High-Performance Web Tools
How to Use SQL Query Execution Plan & AST Visualizer
Generate EXPLAIN Output
In your database client (psql, DBeaver, pgAdmin), run "EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) SELECT ...;" or MySQL "EXPLAIN FORMAT=JSON SELECT ...;".
Paste Plan Into Visualizer
Paste the JSON or text execution plan output into the input editor or choose a built-in preset.
Inspect Tree & Cost Nodes
Review the visual execution tree. High-cost nodes and full table scans are highlighted in red and amber badges.
Apply Index & Query Optimizations
Follow the generated Optimization Checklist to add missing B-Tree indexes or refresh stale statistics.
Practical Examples & Conversions
EXPLAIN (ANALYZE, FORMAT JSON) SELECT * FROM orders WHERE status = "PROCESSING";
Recommendation: CREATE INDEX idx_orders_status ON orders (status);
Frequently Asked Questions (PAA)
Related Tools & Converters
World Clock Grid
Live real-time clocks for major global financial hubs and cities worldwide.
Time Zone Converter
Convert and compare times across global time zones with drag-and-drop timeline sliders.
International Meeting Planner
Find optimal overlapping working hours across distributed global remote teams.
Interactive World Calendar
National holidays, observances, and moon phases for 100+ countries.
Authoritative Standards & Citations
Calculations and algorithms on this page are implemented and verified in strict accordance with the following official technical specifications:
RFC 7519: JSON Web Token (JWT)
Standardized compact, URL-safe means of representing claims to be transferred between two parties.
Web Cryptography API Specification
Standard JavaScript API for performing basic cryptographic operations in web applications.
RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace
Definition of uniform format and generation algorithms for UUIDs.