Update a major column in an IDS 7.30 Database
Posted in 2000
Topics: Migration, Import/Export & Data Conversion, Versions, Editions & End-of-Life
We have a 10GB database with about 15 big tables all have more than 10 millions of records. They all have an ID column which is defined as integer. Now the ID is goint to be reassigned and my job is to update all history data with the new ID. How to do this efficiently ? Write many UPDATE sqls, and let it run for a long time? Or use unload/dbload like doing a migration ? Or is there any better ways that whenever the old ID is refered it will be mapped to new ID ? Thanks, Chushia Chen
Rename the old ID column, to say OldID, add a column to hold the new ID, then update the rows to contain the new ID value. You will be able to lookup rows by either ID. Art S. Kagel Liu Jun wrote: > > We have a 10GB database with about 15 big tables all have more than 10 > millions of records. They all have an ID column which is defined as > integer. Now the ID is goint to be reassigned and my job is to update > all history data with the new ID. How to do this efficiently ? Write > many UPDATE sqls, and let it run for a long time? Or use unload/dbload > like doing a migration ? Or is there any better ways that whenever the > old ID is refered it will be mapped to new ID ? > > Thanks, > Chushia Chen