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 > system tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-22-08, 16:18
db2link db2link is offline
Registered User
 
Join Date: Jan 2008
Posts: 13
Wink system tables

Hi All, Can anyone help me which DB2's system table keeps the inforamation about tablespace container's for example number of used pages, number of free pages, usable pages etc.
thanks
sunny
Reply With Quote
  #2 (permalink)  
Old 03-22-08, 18:12
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
That information is not kept in the system catalog tables (except for some stale statistics that are only updated after a runstats). You can do a tablespace snapshot to get the information.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 03-23-08, 03:59
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
Quote:
Originally Posted by db2link
Hi All, Can anyone help me which DB2's system table keeps the inforamation about tablespace container's for example number of used pages, number of free pages, usable pages etc.
SYSIBM.SYSTABLEPART
(at least, on z/OS)
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
  #4 (permalink)  
Old 03-23-08, 05:28
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by Peter.Vanroose
SYSIBM.SYSTABLEPART
(at least, on z/OS)
Since he mentioned containers, he was talking about DB2 or LUW. In any event, that catalog stats are only updated after a runstats or stospace utility (for z/OS), depending on the number being looking at.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 03-23-08, 11:58
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Keeping such statistics current in the catalog is not a good idea in the first place. The reason being that each write operation on a container that causes changes to those statistics would trigger an update to the catalog. And catalog updates must be locked. So besides requiring 2 writes instead of just 1, it also impacts concurrency in a negative way. Therefore, the mentioned statistics are only snapshot information of the point in time when RUNSTATS was executed the last time.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #6 (permalink)  
Old 03-23-08, 17:44
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
Quote:
Originally Posted by stolze
Keeping such statistics current in the catalog is not a good idea in the first place. The reason being that each write operation on a container that causes changes to those statistics would trigger an update to the catalog.
What about runtime statistics (RTS) ?
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
  #7 (permalink)  
Old 03-26-08, 14:13
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Same thing. So if you have a system where you really need to squeeze out the last fraction of a percent for performance, you will typically turn off RTS.

DB2 can try to do things in a smarter way like maintaining deltas of changes on the per-table level and then writing those changes only once.

The same could be done on a container-level. However, the need for current statistics on a container-level is much, much less. Today, you usually use automatic storage and don't care about container-stats anyway. RTS on the other hand is used for a lot of different things now, and the usage will expand over time.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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