Marking Index as Unusable ORACLE 11G
Posted on 2012-09-05
In a stored procedure I am marking indexes as unusable before truncating and inserting data due to having to insert over 300,000 records.
While running the stored procedure I checked to see if indexes were flagged and they weren't.
When I execute these statements from TOAD, they are marked with a red X to indicate they have been flagged as unusable.
What are some factors that could contribute to them not being flagged when statements are executed in the stored procedure?
I've done the following
EXECUTE IMMEDIATE ('ALTER INDEX careergrp_ndx UNUSABLE');
EXECUTE IMMEDIATE ('ALTER INDEX rating_ndx UNUSABLE');
EXECUTE IMMEDIATE 'TRUNCATE TABLE training;
FOR per_rec IN get_person_training
-- REBUILD INDEXES