We have an Oracle 7.3.4 database that has a table with over 8 million records in it, data back through Jan 1999. I have been tasked to remove all of the 1999 data. I didn't want to blow the rollback segments by deleting all the data at once, so I wrote twelve delete queries like the following:
I am expecting this query to delete 138682 records, but it is taking a very long time (been going for over an hour now). I understand it has to do a full table scan to do this, but if I change the query to a SELECT COUNT(*) query, it takes about 10 minutes to count the same records.
Any suggestions on what I could do to speed this up? Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.
Code:
DELETE FROM C_CONTACT
WHERE SUBSTR(DATE_OF_CONTACT,4,6) = 'JAN-99'
Any suggestions on what I could do to speed this up? Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.