Guides ยท Technology
Database Indexing Basics
Speed up queries
Indexing adds data structures that speed WHERE, JOIN, and ORDER BY queries at the cost of write overhead and space; choose keys carefully.
- b-tree
- covering index
- selectivity
- composite
- analyze
Pick Columns
Index columns with high selectivity used in filters and joins.
Design Keys
Use composite indexes in filter order; avoid redundant indexes.
Maintain
Monitor bloat and writes; drop unused indexes.