Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2012
    Posts
    1

    Unanswered: Is reorg necessary after renaming a column?

    Hi all,

    I want to rename a column on a large table, and I'd like to avoid doing a reorg on the table if it's not necessary. It seems that when you drop columns, reorg is typically recommended, but I'm having trouble determining if a reorg is necessary after renaming. Any help is appreciated.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    The documentation does not mention REORG when renaming a column. It does mention it whenever the data format changes (like dropping a column). So I guess you are OK to skip the REORG when you rename a column.

    Note: this would be easy to test. Create a table, rename a column, then see what you can do to that table.


    Andy

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Reorg is not needed for rename. The column names are not stored in the table pages or rows, only in the DB2 Catalog. That is why a reorg would be irrelevant.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    in good db2 shops they do maintenance (reorgs and runstats) on regular basis (daily, weekly, etc) so it should take care of this
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by MarkhamDBA View Post
    in good db2 shops they do maintenance (reorgs and runstats) on regular basis (daily, weekly, etc) so it should take care of this
    Offline reorg (needed after some table changes) requires an outage. Not all applications allow outages, and it has nothing to do with whether the shop is good or bad. Runstats is a different subject since it does not require an outage.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  6. #6
    Join Date
    Aug 2008
    Posts
    147
    Take a copy of the accesspath based on a query prior to renaming the column and after renaming the column, . This might give you some clue if you have issues , which you think may be caused by bottlenecks .
    Based on a column name change - i don't think you'll have any problems
    ---------------------------------
    www.sqlserver-dba.com
    www.dba-db2.com

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •