473,385 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Archiving data on very large tables

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
partition.

Nov 12 '05 #1
1 1996
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 http://www.dbmonster.com
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alias | last post by:
Hi Guys , I am still new to the db2 world so pls help me with the following : I have 2 tables A & B in different databases . They can be joined on a customer_number column. I have to archive...
6
by: Peter | last post by:
Hello, After restoring my database I have some problems with diag.log who becomes very large. The "logretain" and "userexit" are set to "recovery" and "on" respectively. Any suggestions are...
1
by: Sally Ruggero | last post by:
I need advice on archiving data from our production database. Each night I would like to save and remove a day's data from two weeks ago, from all the tables. I know how to delete the...
4
by: Geoff | last post by:
I want to archive records from one recordset to another recordset. Not too sure of what to do in commented areas shown below. Dim Db As DAO.Database Dim Rec1 As DAO.Recordset 'Set as...
4
by: Paul H | last post by:
Could some one give me some pointers on basic archiving techniques? I have developed several databases but never been faced with this issue. Here is the basic scenario.. Suppose I have the...
4
by: mforema | last post by:
Hi Everyone, I have a database that currently has two types of tables: one type has all of the current data, and the other type has all of the previous, outdated data. I already have command...
0
by: Michel Esber | last post by:
Hello, Linux RedHat AS4 running DB2 V8 FP15. I have very large tables (100 Million+ rows), and I only need to keep 6 months of data online/available. The tables have a timestamp field. I...
10
by: nflacco | last post by:
I'm tinkering around with a data collection system, and have come up with a very hackish way to store my data- for reference, I'm anticipating collecting at least 100 million different dataId...
1
by: cleary1981 | last post by:
Hi, I have created a database that logs realtime data and stores 1440 records per day in my database. This system must log data 24hrs a day and always running. My fear now is that my db will...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.