SQL Explain Plan Analyzer

Paste MySQL or PostgreSQL EXPLAIN JSON output and get a clean, tree-style execution plan with warnings for table scans, high-cost nodes and actionable tuning tips.

FreeOnline Tool
Loading…

How to Use

Run EXPLAIN FORMAT=JSON (MySQL) or EXPLAIN (FORMAT JSON) (PostgreSQL) in your database client and paste the output into the box, then click 'Analyze'. The tool detects the database type automatically and renders the plan as an indented tree, showing the operation, table, estimated rows, cost and actual rows for every node. Problematic nodes are flagged by severity (critical/high/medium/low), and all warnings plus tuning suggestions are listed below the tree. Use the 'MySQL Sample' or 'PostgreSQL Sample' buttons to try it instantly.

Features

  • Auto-detects MySQL and PostgreSQL explain plan JSON formats
  • Renders a clear tree view with operation, table, rows, cost, time and index details per node
  • Flags table scans and high-cost nodes by severity level
  • Provides actionable SQL tuning suggestions
  • Built-in MySQL and PostgreSQL sample plans

Use Cases

Troubleshoot slow queries
Paste the EXPLAIN JSON of a slow query to spot full table scans, high-cost nodes or missing indexes quickly
Verify index changes
Compare plan trees before and after adding an index to confirm the scan type changed to an index scan
Learn how optimizers work
Visualize nested loops, index scans and other steps to build an intuition for query planning
Performance review in code review
Share the explain plan of critical queries with the team so everyone can discuss the same evidence

FAQ

Does it connect to my database?
No. Only the pasted text is parsed, nothing is uploaded, so you can safely analyze plans from production queries
Which databases are supported?
MySQL EXPLAIN FORMAT=JSON and PostgreSQL EXPLAIN (FORMAT JSON) output; the database type is detected automatically
Why does it say 'Unrecognized format'?
Make sure you pasted the JSON-formatted explain output (add FORMAT=JSON in MySQL and (FORMAT JSON) in PostgreSQL), not the plain tabular EXPLAIN text
How accurate are the warnings?
Warnings are heuristic checks based on rows, cost and access type in the plan. Treat them as a starting point and confirm against your real data