If I had two massive tables in a database, and I wanted to replace one
with the other, what would be the quickest way to do that? We're
talking millions of records here.
The first thought is to drop the records in the first table and then
iterate over each of the records in the second table, inserting each
one into the original table, finally dropping the second table
entirely.
But this is really time consuming. Surely, there must be some much
more straightforward way of doing this. A point in the right direction
is all I need. Thanks!
rename table xxx to yyy?
Otherwise, google for "DB2 load from cursor". This is the fastest way
to really move your data.
--
Frederik Engelen
RealDolmen NV