This is a follow-on to thread186-80645. As mentioned there, I have a large table (approx. 9 million rows) that I am trying to remove approx. 3.5 million old records from. I am currently on the backup system/database. Since this query is looking like it is going to take 2+ days to run, I can't see how I will be able to do this on my production side server.
I have thought about breaking up the deletion into smaller chunks, but it will still require a full table scan, which I think is the reason for this thing running so long.
I have also played with the option of creating duplicate tables (there are actually three large tables linked by a key field, but I have cleaned most of the other two up already), running a query to copy just the data that I want to keep into these duplicates, dropping the PK\FK links, truncating the tables, and then reloading the data from the duplicates. The problem with this is that even though I have been tasked to do this, I have not been given DBA permissions needed for the truncate command. Also, I am not sure how long it would take to rebuild the PK\FK link.
I am looking for suggestions. I have never played with a database this large and just didn't expect the time that it is taking to do things to be soooo long. 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.
I have thought about breaking up the deletion into smaller chunks, but it will still require a full table scan, which I think is the reason for this thing running so long.
I have also played with the option of creating duplicate tables (there are actually three large tables linked by a key field, but I have cleaned most of the other two up already), running a query to copy just the data that I want to keep into these duplicates, dropping the PK\FK links, truncating the tables, and then reloading the data from the duplicates. The problem with this is that even though I have been tasked to do this, I have not been given DBA permissions needed for the truncate command. Also, I am not sure how long it would take to rebuild the PK\FK link.
I am looking for suggestions. I have never played with a database this large and just didn't expect the time that it is taking to do things to be soooo long. 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.