db-query-optimization
Installation
SKILL.md
DB Query Optimization
Overview
Use this skill to improve query performance based on execution evidence, not intuition.
Scope Boundaries
- Hot-path latency or database CPU/IO usage is query-bound.
- Query plans are unstable across parameter distributions.
- Workload changes expose previously acceptable query anti-patterns.
Core Judgments
- Dominant bottleneck: scan cost, join explosion, sort spill, lock wait, network round trips.
- Rewrite scope: query shape, index changes, schema adjustment, or materialization.
- Plan stability and parameter-sensitivity risk.
- Correctness risk from aggressive rewrite or approximation.