I have a procedure that does the following:
DROP INDEXES
MERGE STMT ... (with large no of records)
CREATE INDEXES
Although droping the index before the merge helps, the index creation time is also significant so i tried to the following
SET INDEXES unusable (alter index indexname unusable)
MERGE STMT ... (with large no of records)
rebuild index (alter index indexname rebuild)
My problem: i cannot do the Merge Now :
ERROR at line 2:
ORA-26026: unique index IDS_WAREHOUSE.BTN_IDX_00_1 initially in unusable state
Apparently I cannot have a unusable unique index while doing a DML ?
Am I doing this right? and can anyone please suggest a better way to do this that drop/create index in this case.
[Updated on: Thu, 20 August 2009 04:15]
Report message to a moderator