Rebuilding Globally Partitioned and Non-Partitioned Indexes

Almost any partition-level operation on a table will render any globally partitioned or non-partitioned index unusable. Essentially, the indexes always must be rebuilt. One built-in feature in Oracle 11g is to allow you to rebuild the indexes as part of the partition-level table operation. Using the partition-level merge operation example in the previous “Merge Partition” section, you can see that you can add the UPDATE INDEXES clause as part of the ALTER TABLE...MERGE command. This instructs Oracle to rebuild any indexes marked unusable by the partition-level operation. See the following example:

SQL> ALTER TABLE employees_parttest merge PARTITIONS p1995 , pmax   2  INTO PARTITION ...

Get Expert Indexing in Oracle Database 11g: Maximum Performance for Your Database now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.