ALAVENTINE LABS/SOVEREIGN SUITE
⚡

SQLForge™

AL-DEV-07

PostgreSQL & MySQL EXPLAIN visualizer, ORM N+1 loop detector, SQL injection AST auditor, and index advisor. Zero-telemetry database diagnostics.

Aventine Labs

EXPLAIN Execution Plan

Format: JSONEngine: PostgreSQL

5 Critical Bottlenecks Detected

Row Estimation Skew (360.0x) on SortCRITICAL

Stale Table Statistics: Planner estimated 18,000 rows vs actual 50 rows (360.0x skew). Run 'ANALYZE table;' to refresh statistics.

💡 Fix: Execute 'ANALYZE table;' to update pg_statistic catalogs and prevent suboptimal join planning.
External Disk Sort Spill (14280 KB on Disk)HIGH

Sort operation spilled to disk (14280 kB used). work_mem exhausted.

💡 Fix: Increase Postgres work_mem for this session (e.g. SET work_mem = '64MB';) or create an index matching the sort key.
Sequential Scan on Table "orders"HIGH

Sequential scan on table "orders" (18,450 rows). Entire table read from storage.

💡 Fix: Create an index on orders covering columns referenced in: (status = 'COMPLETED'::text)
Heavy Post-Fetch Filter Discard (381,550 rows)HIGH

Heavy filter discards: 381,550 rows removed while returning only 18,450 rows.

💡 Fix: Consider indexing columns in "(status = 'COMPLETED'::text)" to filter rows at the B-tree index level instead of post-fetch heap filter.
Low Buffer Cache Hit Ratio (31.5%)HIGH

Low Buffer Cache Hit Ratio (31.5%). High disk reads (8,940 blocks) detected.

💡 Fix: Increase shared_buffers or add covering indexes to prevent disk I/O thrashing.
Execution Time
146.42 ms
Total Cost
8510.5
Planning Time
1.25 ms
Bottlenecks
5

Execution Plan Hierarchy

Click any node to inspect details
Limit
Cost: 8420.8Time: 145.89 msRows: 50
100%
SortBottleneck
Cost: 8510.5Time: 144.92 msRows: 50
100%
Hash Join
Cost: 7250.3Time: 118.25 msRows: 18,450
86%
Seq Scanon ordersBottleneck
Cost: 4820.0Time: 74.32 msRows: 18,450
57%
Hash
Cost: 1450.0Time: 24.12 msRows: 52,000
17%
Index Scanon customersusing idx_customers_tier
Cost: 1450.0Time: 16.45 msRows: 52,000
17%