query-optimization
Installation
SKILL.md
Query Optimization
Making queries fast through understanding execution plans and indexes.
Context
You are optimizing slow queries. Use EXPLAIN PLAN to understand execution.
Domain Context
- Execution Plan: How database executes query; cost is estimate
- Sequential Scan: Reads all rows; slow on large tables
- Index Scan: Uses index; much faster if selective
- Join Strategy: Nested loop, hash, sort-merge; tradeoffs
- Cardinality: Rows filtered at each step