I am looking for a creative solution to a problem which concerns us. We have a fairly large table -- 210 million rows in production. What we want to do sounds simple. But so far our approaches produce extremely slow run times.
We need to add a new column at the end of the table which will be a timestamp. The rowsize is approx 200 bytes already. We wish to initialize that new column with another timestamp that exists elsewhere in the row. In the future the new column will have the "current" timestamp for inserted rows. This is the way they wish to populate the column for existing rows. So basically we need to write a program which will update every one of 210 million rows in an application that has to stay up 24 by 7 (I don't have a day of downtime, sorry).
One technique we used took 30 minutes to update 10,000 rows. At that rate, the update process would take almost a year. I am looking for a more streamlined approach, needless to say.
A few more details: There are multiple indexes on this table (but not on the new column). The table is replicated across two machines.
Appreciation any suggestions at all.
Hal
DB2 & UDB email list listserv db2-l LazyDBA home page