Hi,
We need to replace one index with another. Both indexes are similar (index columns are the same) except new index has one included column. System must remain on-line while index is replaced/recreated
Initial approach was to drop old index and create new one. That would take about 50 seconds. Objective is to decrease that time. New idea would be to create new index then drop old one and rename new one to have old one's name. Steps:
1) Create new index, let's call it MY_INDEX_1
2) Drop old index named MY_INDEX
3) rename MY_INDEX_1 to MY_INDEX
I suppose renaming will be done instantly but still have to check if any issues can be expected? For instance, once new index is created, some query uses it in exec plan and we rename index in that particular moment, can we expect some trouble?
Thanks in advance!