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 > DB2 Table size

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-28-04, 06:02
db2man db2man is offline
Registered User
 
Join Date: Oct 2004
Posts: 28
DB2 Table size

How can I find out what the biggest table is in the database USING COMMAND LINE, is there a command to check this.
Reply With Quote
  #2 (permalink)  
Old 10-28-04, 06:54
Filip Poverud Filip Poverud is offline
Registered User
 
Join Date: Oct 2004
Location: Norway
Posts: 53
You can connect to the subsystem by CLI and selec its name from sysibm.systables

---

/pF
Reply With Quote
  #3 (permalink)  
Old 10-28-04, 07:05
db2man db2man is offline
Registered User
 
Join Date: Oct 2004
Posts: 28
doing a select from sysibm.tables does not give you the size of the table.
Is there another to find out what THE BIGGEST TABLE IS IN THE DATABASE, assumimg I have 5000 tables in the database.

Please help ladies and gents

Thanks
Reply With Quote
  #4 (permalink)  
Old 10-28-04, 10:07
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Provided you have relatively current statistics, you can query FPAGES from SYSCAT.TABLES - that will give you the number of tablespace pages allocated for the table. It should be easy from there.
Reply With Quote
  #5 (permalink)  
Old 10-29-04, 07:42
Filip Poverud Filip Poverud is offline
Registered User
 
Join Date: Oct 2004
Location: Norway
Posts: 53
Look at what n_i said and open the manual for the system tables to find out what info you have there.

Another way depends on how you designed your database schema and the OS and FS.

On Mainframe, on VSAM datasets, with 1:1 partitioning, where all tables has it's own tablespace, the only thing you need to do is look at the extents for the dataset and see how many are in use. You can sort this in DSList.

I don't know how tablespaces are stored on Windows and AIX, but it may work there as well.

---

Regards

/Filip
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