Re-creating a Global Index
Oracle Text provides RECREATE_INDEX_ONLINE to re-create a CONTEXT index with new preferences, while preserving inserts, updates, and deletes on the base table. You can use RECREATE_INDEX_ONLINE in a single-step procedure to re-create a CONTEXT index online for global indexes. Because the new index is created alongside the existing index, this operation requires storage that is roughly equal to the size of the existing index. Also, because the RECREATE_INDEX_ONLINE operation is performed online, you can perform inserts, updates, and deletes on the base table during the operation. All insert, update, and delete operations that occur during the re-creation process are logged into an online pending queue.
-
After the re-creation operation is complete, new information may not be immediately reflected. As with creating an index online, you should synchronize the index after the re-creation operation is complete to bring it fully up-to-date.
-
Synchronizations issued against the index during the re-creation operation are processed against the existing data. Synchronizations are blocked when queries return errors.
-
Optimize commands issued against the index during the re-creation operation return immediately without error and without processing.
-
During
RECREATE_INDEX_ONLINE,you can query the index normally most of the time. Queries return results based on the existing index and policy until after the final swap. Also, if you issue insert, update, and delete operations and synchronize them, then you will be able to see the new rows when you query the existing index. Note: Transactional queries are not supported withRECREATE_INDEX_ONLINE.
Re-creating a Global Index with Time Limit for Synch
You can control index re-creation to set a time limit for SYNC_INDEX during nonbusiness hours and incrementally re-create the index. Use the CREATE_SHADOW_INDEX procedure with POPULATE_PENDING and maxtime.
Re-creating a Global Index with Scheduled Swap
With CTX_DDL.EXCHANGE_SHADOW_INDEX, you can perform index re-creation during nonbusiness hours when query failures and DML blocking can be tolerated.
See Also:
-
Oracle Text Reference to learn more about the
RECREATE_INDEX_ONLINEprocedure -
Oracle Text Reference for information and examples for
CREATE_SHADOW_INDEX -
Oracle Text Reference for information and examples for
CTX_DDL.EXCHANGE_SHADOW_INDEX