What is the main trade-off of adding an index to a table?
- Faster reads, slower writes
- Stronger locks, fewer deadlocks
- Less disk space, slower reads
- Faster writes, slower reads
An index speeds up lookups, but every
Play SQL & Databases ▸
INSERT, UPDATE and DELETE must also maintain it and it takes space.