Re: Moving data between tables
Posted in 1995
I have a setup which is close to what you're asking for. I have a trigger installed on our daily table, which upon any insert will copy that row into a history/archive table in another database on a different Online server (Note: it could write to a table in the same database just as easily). The move is done automatically, and as long as I trap for errors in the trigger, I can be certain that the data is being copied to the other table. Then at the end of the day, I just delete from the daily table. Tracy W. Nedd National Weather Service - DBA vball@skipper.ssmc.noaa.gov > 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?