Database Indexes
An index is a data structure that speeds up data retrieval at the cost of storage and write performance.
Learning Objectives
Lesson Outline
An index is a data structure that speeds up data retrieval at the cost of storage and write performance.
| Type | Best For | Example |
|---|---|---|
| B-Tree | Range queries, equality | Most common |
| Hash | Equality only | WHERE id = 5 |
| Full-text | Text search | Search engines |
| Bitmap | Low cardinality | Gender, Status |