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 > update the statistics on the system tables?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-19-09, 14:12
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
update the statistics on the system tables?

We are migrating to v9.5.1. Migration guide says:

During database migration, the statistics collected for system catalog tables are not retained. You must update the statistics for these tables using the RUNSTATS command.

Do I understand this sentense "update the statistics on the system tables" right? When I asked this question before the answer was yes RUNSTATS on SYSCAT tables:
runstats on SYSCAT tables

What does it mean exactly?
RUNSTATS ON table SYSCAT.<tablename> ... ???

But they are not tables but views.

Thanks
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #2 (permalink)  
Old 03-19-09, 14:17
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Run it on the underlying tables SYSIBM.*

Andy
Reply With Quote
  #3 (permalink)  
Old 03-19-09, 14:19
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
Quote:
Originally Posted by ARWinner
Run it on the underlying tables SYSIBM.*

Andy
Thanks, Andy.

Do I understand it right that runstats should be done for SYSIBM table (not user/application tables)?
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #4 (permalink)  
Old 03-19-09, 14:21
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You should periodically do runstats on the user/application depending on their volatility. You only need to do runstats on the sysibm tables after major changes to the catalog (or after a migration).

Andy
Reply With Quote
  #5 (permalink)  
Old 03-19-09, 14:23
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
Quote:
Originally Posted by ARWinner
You should periodically do runstats on the user/application depending on their volatility. You only need to do runstats on the sysibm tables after major changes to the catalog (or after a migration).

Andy
Thanks for clarification, Andy. I appreciate it.
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #6 (permalink)  
Old 03-19-09, 16:01
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
done it (wrote a script to do runstats on all SYSIBM.tables) but most tables which names don't start with SYS (e.g. SYSIBM.SQLTABLES, SYSIBM.TABLES) are not updatable. Interesting...
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #7 (permalink)  
Old 03-19-09, 16:07
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Quote:
Originally Posted by MarkhamDBA
done it (wrote a script to do runstats on all SYSIBM.tables) but most tables which names don't start with SYS (e.g. SYSIBM.SQLTABLES, SYSIBM.TABLES) are not updatable. Interesting...
That is because they are not tables, they are views.

Andy
Reply With Quote
  #8 (permalink)  
Old 03-20-09, 09:59
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
Quote:
Originally Posted by ARWinner
That is because they are not tables, they are views.

Andy
Right. While modifying the query I omitted TYPE='T' from WHERE clause so the query was selecting views as well. Good catch. Thank you, Andy
__________________
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