Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Posts
    6

    Unanswered: alter an index in db2

    Hi,

    I have to alter an index by adding two columns into it.

    My table contains data and according to the requiremnet the data must be preserved.
    So i am dropping the index and creating the index with two new columns.
    Is that enough?But do i need to do anything with data????

    Please suggest me.

    Thanks in advance.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Dropping the index and creating the new one is the way to go. It will not affect the data at all.

    Andy

  3. #3
    Join Date
    Aug 2009
    Posts
    8
    Agree with Andy.. but also make sure that you do RUNSTAT after altering indexes.

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    And after RUNSTATS, you will need to rebind all static SQL and packages.

    Andy

  5. #5
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    Quote Originally Posted by ARWinner
    you will need to rebind all static SQL and packages
    and don't forget to flush your package cache....

Posting Permissions

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