Databases · Junior · Question 44 of 75
Why not add an index on every column?
- 1PostgreSQL allows only one index per table
- 2Indexes make
SELECTqueries slower - ✓Correct answer: Each index slows down inserts and updates and takes disk space and memory
Explanation
Add indexes for real query patterns and remove unused ones. PostgreSQL's statistics views show how often each index is used.