If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > runstats when adding a new col

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-10-09, 11:42
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
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 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #2 (permalink)  
Old 11-10-09, 12:22
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Quote:
- alter a table to add a column,
Yes, if you are using it in a predicate.

Quote:

- 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
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.

Last edited by sathyaram_s; 11-10-09 at 12:55.
Reply With Quote
  #3 (permalink)  
Old 11-10-09, 14:45
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
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 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On