Jim Youmans
asked on
DB2 best way to delete large amounts of data
DB2 10.5 on Windows.
I have a DB2 database that I am removing a large amount of old data from. So tables with 130,000,000 rows will be reduced to 5,000,000. I want to do this quickly and cleanly with minimum impact to storage. I have read several articles on how to do this but each suggest a different way.
What is the most efficient way to do this? Should I copy the data I am going to keep to a new table and then drop and recreate the original and then copy it back in?
Or should I use a delete or truncate routine? If I do it this way, will I need to do a reorg with truncate on the tables afterwards?
Any suggestion would be very welcomed. Thank you!
Jim
I have a DB2 database that I am removing a large amount of old data from. So tables with 130,000,000 rows will be reduced to 5,000,000. I want to do this quickly and cleanly with minimum impact to storage. I have read several articles on how to do this but each suggest a different way.
What is the most efficient way to do this? Should I copy the data I am going to keep to a new table and then drop and recreate the original and then copy it back in?
Or should I use a delete or truncate routine? If I do it this way, will I need to do a reorg with truncate on the tables afterwards?
Any suggestion would be very welcomed. Thank you!
Jim
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you!
ASKER