System Design · Junior · Question 59 of 75
What does a database index do?
- ✓Correct answer: Speeds up searching by a column using an extra data structure, at the cost of slower writes and more storage
- 2Encrypts the table
- 3Counts rows automatically
Explanation
Without an index, filtering scans the whole table. Index columns used in WHERE, JOIN and ORDER BY of frequent queries.