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 > finding the table volumes.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-06-07, 02:34
anant123123 anant123123 is offline
Registered User
 
Join Date: Nov 2007
Posts: 21
finding the table volumes.

I've 20 tables in the database. How can I find the top table in volume?
Reply With Quote
  #2 (permalink)  
Old 12-06-07, 03:53
umayer umayer is offline
Registered User
 
Join Date: Dec 2005
Posts: 273
Run the RUNSTATS utility and then check the column NPAGES of the
SYSIBM.SYSTABLES catalog table.
This columns stores the number of pages used by the table
Reply With Quote
  #3 (permalink)  
Old 12-07-07, 06:10
anant123123 anant123123 is offline
Registered User
 
Join Date: Nov 2007
Posts: 21
Thanks, it's giving the pages information.

I've seen the rows in the SYSIBM.SYSTABLES and found that some values of NPAGES are -1.

Can any one please explain NPAGES=-1?
Reply With Quote
  #4 (permalink)  
Old 12-07-07, 06:42
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Did you RUNSTATS on the table?

-1 can also mean that the 'table' is a view or alias.

BTW, to know the size of the table, you'll have to multiply the npages with the pagesize of the tablespace.

Oh, don't forget the size of indexes either.

If you are using DB2 LUW, I would recommend using the catalog view SYSCAT.TABLES instead of the SYSIBM.SYSTABLES.

HTH

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