db-index-hygiene
Installation
SKILL.md
db-index-hygiene (M12)
The inverse of M11: M11 adds missing indexes, M12 removes the ones that only cost. Every index slows
writes and consumes storage and cache; duplicates and never-read indexes are pure overhead. Feeds the
Performance & Scale score (axis performance, relational Higiene de índices w16).
What it checks
- Exact duplicates — two indexes with the identical key column list (and same type/predicate); one is redundant.
- Redundant prefix — index on
(a)is fully covered by an existing index on(a, b); the shorter one can usually be dropped (B-tree leftmost-prefix rule). - Unused — an index with no scans over a representative window (Tier-2
idx_scan = 0). This is runtime truth: never declared unused from static analysis alone.
Score / axis
Feeds performance only (relational Higiene de índices w16; folds into Indexación in NoSQL profiles).