wellster34
Programmer
We are running into Major Performance Problems trying to Purge data. The Tables and Indexes are analyzed and the column used in the Purge is a Date. There is an index on that column considering that is the driver of the purge. There are approx 14 million rows in the table. Each day of information that is trying to be purged is an average of 180,000 rows. This script is run on an UNIX environment via sqlplus and using PL/SQL logic to execute the commands.
We currently have a Looping structure:
LOOP
DELETE FROM View of the table
WHERE DATE < (SYSDATE-90)
AND ROWNUM < 500
EXIT WHEN SQL%ROWCOUNT = 0;
COMMIT;
END LOOP;
COMMIT;
Now, is a View better than the table name? Is a Cursor better? Any suggestions on how to purge the data efficiently? I really do not know, any help on this subject would be greatly appriciated.
Thanks.
We currently have a Looping structure:
LOOP
DELETE FROM View of the table
WHERE DATE < (SYSDATE-90)
AND ROWNUM < 500
EXIT WHEN SQL%ROWCOUNT = 0;
COMMIT;
END LOOP;
COMMIT;
Now, is a View better than the table name? Is a Cursor better? Any suggestions on how to purge the data efficiently? I really do not know, any help on this subject would be greatly appriciated.
Thanks.