Create new, delete old, rename... when rebuilding indexes
When a index has been modified that causes the index to be rebuilt, add a option to rebuild using the following flow.
Create new index with temp name.
Drop existing index.
Rename index with temp name to correct name.
For tables that take a few hours to build indexes on, this will allow the existing index to remain being used while the new one is building. Then once it is built, remove the original index.
6
votes
John Carew
shared this idea