I have to truncate a partition (392,000 records) of a table with 20.000.000 records.
At the moment, I'm making a truncate table and rebuilding indexes. But the table has 37 indexes and it takes 20 minutes to rebuild them.
Taking a look at the Oracle Docs it gives me three options:
1- (This is what I'm doing)
ALTER TABLE sales TRUNCATE PARTITION dec98; ALTER INDEX sales_area_ix REBUILD;
DELETE FROM sales PARTITION (dec98); ALTER TABLE sales TRUNCATE PARTITION dec98;
ALTER TABLE sales TRUNCATE PARTITION dec98 UPDATE INDEXES;
So I have two questions:
1- Which of these options would be the faster in my case? 2- What is the meaning (in option 2) of deleting and then truncating the partition?
Thanks in advance!