database-indexing
Installation
SKILL.md
Database Indexing
Use this skill when
- Choosing where indexes help
- Designing composite indexes from queries
- Reviewing index usage and bloat
Do not use this skill when
- Tuning a single slow query (use query-optimization)
- Defining schema from scratch
Instructions
- Index from query workload evidence, not guesses.
- Match composite index order to query predicates (equality, then range).
- Use covering indexes for high-frequency reads.
- Beware write amplification on frequently written tables.
- Monitor index usage; drop unused and duplicate indexes.
- Partial/functional indexes for filtered and expression queries.
- Rebuild or reindex tactically; don’t bloat maintenance.