Databases · Middle · Question 8 of 75
What does CREATE INDEX CONCURRENTLY give you?
- 1It makes the index update itself asynchronously after each write
- 2It builds several indexes in parallel
- ✓Correct answer: It builds the index without blocking writes to the table, at the cost of taking longer
Explanation
A plain CREATE INDEX blocks inserts, updates and deletes until it finishes, which can mean downtime on a big table. CONCURRENTLY can't run inside a transaction block.