This page focuses on rendering plans and locating bottlenecks. For before-and-after cost validation and judgment, see Performance Validation.
Overview
Database execution plans may contain many layers of operators, cost estimates, row estimates, and database-specific attributes. For complex SQL, reading raw text plans can be difficult and time-consuming. PawSQL converts execution plans into a normalized visual structure:Why Execution Plan Analysis Matters
SQL performance optimization ultimately requires understanding how the database intends to execute the SQL. SQL text alone cannot answer many important questions:- Is the database using an index?
- Which table is being fully scanned?
- Is the join using Hash Join or Nested Loop?
- Which operator has the highest cost?
- Is Sort or Aggregate becoming a bottleneck?
- Are estimated rows expanding dramatically?
- Is a distributed database redistributing data across nodes?
Key Capabilities
Plan tree visualization
Display execution-plan operators and parent-child relationships as a tree or graph. Typical operators include:- Table Scan
- Index Scan
- Index Seek
- Nested Loop
- Hash Join
- Merge Join
- Sort
- Aggregate
- Materialize
- Exchange / Redistribute
Cost visibility
Show key metrics at plan nodes, such as:- Node Cost
- Total Cost
- Estimated Rows
- Actual Rows, when available
- Width / Data Volume
- Execution Time, when present in the plan
Bottleneck identification
Help identify:- High-cost operators
- Full table scans
- Large sorts
- Row-count explosion
- Large-table Nested Loops
- Join skew
- Distributed data movement
Before-and-after comparison
When used with Performance Validation, PawSQL can compare:- Original execution plans
- Plans after SQL rewrite
- Plans after index recommendation
Example
Suppose the original plan is:- Why the access path changed
- Which node became cheaper
- Whether scanned data volume decreased
- Whether the new index is actually being used
Execution Plan Analysis Is Not Just a Pretty Tree
A professional execution-plan tool should do more than convert text into graphics. The real value is helping users answer:Where is the cost? Why is it expensive? What changed after optimization?
Database-aware Plan Parsing
EXPLAIN formats differ substantially across database systems. PawSQL maps database-specific execution plans into a unified model while preserving database-specific details such as:- MySQL access types
- PostgreSQL plan nodes
- Oracle operations
- SQL Server physical operators
- DB2 explain operators
- Distributed-database exchange / motion nodes