Re: Moving data between tables
Posted in 1995
sautins@spot.Colorado.EDU (SAUTINS ANDREW MICHAEL) wrote: > > > We are currently using Informix 7.1 on Solaris > and are having the following problem. Our application > populates a table with data during the day and then, once > the application has finished processing the data, needs to > move the records into another table for storage (30 days > of history). The problem is that during the day, between > 2-4 million records are inserted into our daily table and > moving those records to the history table takes a excessive > ammount of time (i.e., over 24 hours). > > My question is, what is the best way of moving data > from one table to another in the fastest possible manner? > I've heard about detaching and attaching fragments from one > table to another, but our problem seems to be that the processing > can fall behind the population, so using a set number of fragments > may not be possible. Can I attach a table to another? Is there > another solution? I don't have experience with this magnitude of daily records so my suggestion here may be silly. Would it be feasible in some way to insert a record into the history whenever a record is added to the daily table. That way you would only have to drop the daily table at the end of the day. The history table would then also be up to date every minute.