excess-migration-index-requires-justification
Limit explicit indexes to three per table and eight per authored migration.
Why
Every explicit index adds write amplification, storage, vacuum work, and planner surface; bursts of indexes often encode unmeasured read paths in the transactional database.
Fix
Keep at most three explicit indexes per table and eight per migration. Remove redundant indexes, express data uniqueness with inline UNIQUE constraints, and review the workload before adding indexes. Evaluate ClickHouse for reporting, historical analysis, and broad aggregations.
Examples
CREATE INDEX a_idx ON event (a);
CREATE INDEX b_idx ON event (b);
CREATE INDEX c_idx ON event (c);
CREATE INDEX d_idx ON event (d);CREATE INDEX a_idx ON event (a);
CREATE INDEX b_idx ON event (b);
CREATE INDEX c_idx ON event (c);Formerly: index-budget