When a top-level DDL that affects a non-partitioned domain index is called, the system invokes user-implemented ODCIIndexXXX() and ODCIStatsXXX() methods. Table 8-7 shows these methods.
DDL | ODCI() Method Used in System-Managed Approach |
---|---|
CREATE INDEXTYPE |
Specify the system-managed approach |
CREATE INDEX |
ODCIIndexCreate() |
TRUNCATE TABLE |
>ODCIIndexAlter() with the alter_option=AlterIndexRebuild |
ALTER INDEX |
ODCIIndexAlter() |
GATHER_INDEX_STATS() in DBMS_STATS |
ODCIStatsCollect() |
DELETE_INDEX_STATS() in DBMS_STATS |
ODCIStatsDelete() |
DROP INDEX (Force) |
ODCIIndexDrop() and ODCIStatsDelete() |
INSERT |
ODCIIndexInsert() |
DELETE |
ODCIIndexDelete() |
UPDATE |
ODCIIndexUpdate() |
QUERY |
ODCIIndexStart(), ODCIIndexFetch() and ODCIIndexClose() |
When a top-level DDL that affects a local system managed domain index is called, the system invokes user-implemented ODCIIndexXXX() and ODCIStatsXXX() methods. Table 8-8 shows these methods. In summary, the following rules apply:
DDL | ODCI XXX() Method Used in System-Managed Approach |
---|---|
CREATE INDEXTYPE |
Specify the system-managed approach |
CREATE INDEX |
One call to ODCIIndexCreate(), one ODCIIndexAlter() call for each partition, with alter_option=AlterIndexRebuild, and then a final call to ODCIIndexCreate() |
TRUNCATE TABLE |
One call for each partition: ODCIIndexAlter(), with alter_option=AlterIndexRebuild |
ALTER INDEX |
ODCIIndexAlter() |
GATHER_INDEX_STATS() in DBMS_STATS |
One call to ODCIStatsCollect() |
DELETE_INDEX_STATS() in DBMS_STATS |
One call to ODCIStatsDelete() |
DROP INDEX (Force) |
ODCIIndexDrop(), and if user-defined statistics have been collected then ODCIStatsDelete() |
ALTER TABLE ADD PARTITION |
ODCIIndexUpdPartMetadata(),ODCIIndexAlter() with alter_option=AlterIndexRebuild |
ALTER TABLE COALESCE PARTITION |
ODCIIndexUpdPartMetadata(); ODCIStatsUpdPartStatistics() if statistics are collected |
ALTER TABLE DROP PARTITION |
ODCIIndexUpdPartMetadata(); ODCIStatsUpdPartStatistics() if statistics are collected |
ALTER TABLE TRUNCATE PARTITION |
ODCIIndexUpdPartMetadata(); ODCIIndexAlter() with alter_option=AlterIndexRebuild; ODCIStatsUpdPartStatistics() if a statistics type is associated with the indextype and if user-defined statistics have been collected |
ALTER TABLE SPLIT PARTITION |
ODCIIndexUpdPartMetadata(); ODCIIndexAlter() with alter_option=AlterIndexRebuild only if the result partitions are empty; ODCIStatsUpdPartStatistics() if a statistics type is associated with the indextype and if user-defined statistics have been collected |
ALTER TABLE MERGE PARTITION |
ODCIIndexUpdPartMetadata(); ODCIIndexAlter() with alter_option=AlterIndexRebuildonly if the result partitions are empty; ODCIStatsUpdPartStatistics() if a statistics type is associated with the indextype and if user-defined statistics have been collected |
ALTER TABLE EXCHANGE PARTITION |
ODCIIndexExchangePartition(); if a statistics type is associated with the indextype, and if user-defined statistics have been collected, also ODCIStatsExchangePartition() |
ALTER TABLE MOVE PARTITION |
ODCIIndexUpdPartMetadata() if a partitioned table has a valid system-managed local domain index that has been updated as part of a partition MOVE and rename operation. If a partition is moved without updating the system-managed indexes, the index partition is marked UNUSABLE. |
GATHER_TABLE_STATS() in DBMS_STATS |
One call to ODCIStatsCollect() |
DELETE_TABLE_STATS() in DBMS_STATS |
One call to ODCIStatsDelete(), if a statistics type is associated with the indextype, and if user-defined statistics have been collected |
ALTER INDEX PARTITION |
ODCIIndexAlter() |
INSERT |
ODCIIndexInsert() |
DELETE |
ODCIIndexDelete() |
UPDATE |
ODCIIndexUpdate() |
QUERY |
ODCIIndexStart(), ODCIIndexFetch() and ODCIIndexClose() |