Am workin in oracle 11g. Does ALTER INDEX REBUILD ONLINE render indexes invalid when executed parallely?
I watched an online rebuild with toad and executed a query that used the specified index.
Don't see it becoming invalid. Maybe for a very short time at the precise moment the 'new' index is activated. Haven't found any docs about it yet though.
A new index is built in parallel and while the rebuild is in progress the old index is still available. However, when the new index is swapped in for the old index there will be a period (hopefully short) when neither index is available.
From http://www.oracle-base.com/articles/9i/HighAvailabilityEnhancements9i.php#OnlineIndexRebuilds:
When the ONLINE keyword is used as part of the CREATE or ALTER syntax the current index is left intact while a new copy of the index is built, allowing DML to access the old index. Any alterations to the old index are recorded in a Index Organized Table known as a "journal table". Once the rebuild is complete the alterations from the journal table are merged into the new index. This may take several passes depending on the frequency of alterations to the index. The process will skip any locked rows and commit every 20 rows. Once the merge operation is complete the data dictionary is updated and the old index is dropped. DML access is only blocked during the data dictionary updates, which complete very quickly.