juniorOptimisation
What is database indexing?
Updated May 17, 2026
Short answer
Indexing improves database query speed by reducing search space.
Deep explanation
Indexes act like lookup tables that allow quick access to rows without scanning entire tables.
Real-world example
Searching user profiles in large social media databases.
Common mistakes
- Over-indexing which slows down writes.
Follow-up questions
- What is a B-tree index?
- Do indexes affect writes?