SQL Execution Planner
Paste a SELECT query and get a heuristic execution plan — the kind of thing EXPLAIN would show, but without needing a live database. The planner identifies tables, JOINs, WHERE filters, GROUP BY and ORDER BY, estimates per-step row counts and cost (index vs full scan), and flags common mistakes like SELECT *, missing WHERE, or cartesian joins.
How to use
- 1
Paste your SQL
Drop a SELECT, INSERT, UPDATE or DELETE statement. The parser focuses on SELECT but accepts any statement.
- 2
Click Explain
The tool heuristically parses tables, JOINs, WHERE, GROUP BY, HAVING, ORDER BY and LIMIT.
- 3
Review the plan
Each step lists its operation, scan type, estimated rows and cost. The total cost sums every step.
- 4
Check warnings
Common issues (SELECT *, missing WHERE, cartesian joins, unindexed filters) are flagged so you can fix them before running the query.
Common use cases
- Estimate whether a query will be cheap or expensive before running it in production.
- Teach SQL performance concepts: index vs full scans, join order, sort cost.
- Spot missing WHERE clauses or SELECT * early in code review.
- Compare two formulations of the same query by their estimated cost.
Limitations
- This is a heuristic planner, not a real database engine. Real costs depend on statistics, indexes and the DBMS optimiser.
- Subqueries, CTEs and window functions are detected but not deeply modelled.
- The tool assumes an index exists on the primary key only — other indexes are not inferred.
- No SQL is executed; nothing leaves your browser.
Frequently asked questions
Related tools
View allSQL Formatter
Format and beautify SQL queries.
API Response Visualizer
Paste JSON and visualize it as a tree, table or cards.
JSONPath Tester
Test JSONPath expressions against JSON data.
GraphQL Query Explorer
Paste a GraphQL schema and build queries visually.