By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,402 Members | 1,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,402 IT Pros & Developers. It's quick & easy.

Archiving data on very large tables

P: n/a
We have a table in db2 that has about 40 million rows added to it daily and
want to keep a rolling period of 180 days worth of data on the table. We
want to remove either one day or a few days worth of data in batch, but it
must not cause significant locking on the table.
Would using a MDC on the date field in the table help significantly in
speeding up the deletes or is the only real way to remove the old data to
partition the table into weekly partitions and unload the data from each

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Just deleting rows periodically is probably not the biggest problem.
Open a cursor on the table and do positioned deletes on that cursor and
issue a commit every xxxx deletes.

The main problem will be to keep the table and indexes organized to free up
unused space.

Message posted via
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.