Query Execution Map
Parse → Plan → Optimize → Execute → Fetch
run:
Indexed
Unindexed
index
idx_orders_created ON orders (created_at)
scenarios
The full-scan story
The index win
Where the plans diverge
Short-circuit execution
Identical results
indexed run
unindexed run
stage changed by the index (red left-edge)
tables:
orders
1,000,000 rows ·
users
50,000 rows
Prompt — copy back into Claude
Copy Prompt