Do not keep several indexes that serve the same leading prefix needlessly.
Section: Anti-patterns
Avoid duplicate or overlapping indexes
sql
sql
Potential overlap:
INDEX (user_id)
INDEX (user_id, created_at)
The second index may already cover many uses of the first.Explanation
Review actual query patterns before keeping both. Some overlap is justified, but not all of it.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Anti-patterns
Be careful with low-cardinality flags
A boolean by itself is often weak unless paired with something else or made partial.
Remember unused index cost
Unused indexes still hurt writes and consume disk.
SQLite VACUUM after major churn
Compact the file after heavy changes when appropriate.