Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399

    Unanswered: runstats when adding a new col

    is RUNSTATS on the table/indexes needed after I

    - alter a table to add a column,
    - drop/change/create PK?

    thanks
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    - alter a table to add a column,
    Yes, if you are using it in a predicate.


    - drop/change/create PK?
    drop - not necessary
    create/change - yes, to get the PK index stats .. If you are creating a PK index before defining the constraint, you can collect statistics when creating the index
    CREATE INDEX ..... COLLECT DETAILED STATISTICS
    Last edited by sathyaram_s; 11-10-09 at 13:55.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    Quote Originally Posted by sathyaram_s View Post
    Yes, if you are using it in a predicate.

    drop - not necessary
    create/change - yes, to get the PK index stats .. If you are creating a PK index before defining the constraint, you can collect statistics when creating the index
    CREATE INDEX ..... COLLECT DETAILED STATISTICS
    got it. thank so much
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

Posting Permissions

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