How can I reduce the time required to add a column to a 90-million-row table in Db2 for i (IBM i/AS400)?
I'm on IBM i (Db2 for i) and need to deploy a schema change that adds one new field to a physical file/table. The table has about 200 million records in each library, and the same change must be applied to about 150 libraries in a single 5-hour deployment window. **Current approach** 1. Copy the data to a backup file (CPYF). 2. Delete and recompile the file with the new field (CRTPF/CRTDUPOBJ). 3. Copy the data back from the backup (CPYF). 4. Rebuild dependent logical files and indexes. Recompiling the new file object on its own would lose the data, so we copy it out and back in. With 200M row
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.