View previous topic :: View next topic
|
Author |
Message |
nagesh54
New User
Joined: 20 Jun 2008 Posts: 30 Location: Hyderabad
|
|
|
|
Hi,
Is there any way to find the exact size of a table in DB2. I tried to look at the DB2 dataset for the tablespace using Listcat and it is showing that allocated RBA and Used RBA are same. I observed this for many tables. almost both are same for all tables. Then I tried to look through the tools and tried to cross verify this by going in to 3.4 and calculating the tracks and converting it to KB , the values given by tools is not matching the values that I got from calculating. Is there any other method to get the size. Thanks in advance. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
The LISTCAT high allocated RBA is probably your best figure. Since VSAM allocates by CI size, the amount of space allocated and used on each track will not be the track size -- there could be as much as several thousand bytes not used on each track.
But your best bet would be to contact your local DBA and ask about the size of the table. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Robert,
the TS is a DBA |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Um, no comment, then? |
|
Back to top |
|
|
nagesh54
New User
Joined: 20 Jun 2008 Posts: 30 Location: Hyderabad
|
|
|
|
Hi,
Thanks alot for your help.
I am a DBA and I was wondering if there is any simple way of finding it.
one method is taking the no of rows and multiplying with the rowsize and adding the offset for the index. |
|
Back to top |
|
|
Raghu navaikulam
Active User
Joined: 27 Sep 2008 Posts: 193 Location: chennai
|
|
|
|
Hi nagesh54
You can do a RUNSTATS on the tablespace in which the table is residing.
The output includes SPACE which indicates the number of kilobytes of space that is currently allocated for all extents for the table.
Regards
Raghu |
|
Back to top |
|
|
am_ne
New User
Joined: 24 Mar 2007 Posts: 25 Location: Bangalore
|
|
|
|
Looks like you are looking for size of the table not tablespace (Segmented tablespace with multiple tables). May be the only options to calculate it is for the number of records, though we have to consider SEGSIZE, PCTFREE, FREEPAGE and index offset.
The listcat will give the correct utilization(used RBA) in Bytes. Runstats with UPDATE SPACE option also update the SYSIBM.SYSTABLEPART with the current utilization(SPACE column) in KB.
As per tools, they internally refer some internal tables to get utilization statistics (BMC DASD manager functionality). So the result set depends on the latest update.
Regards,
Amit |
|
Back to top |
|
|
Raghu navaikulam
Active User
Joined: 27 Sep 2008 Posts: 193 Location: chennai
|
|
|
|
Hi am_ne
Quote: |
Looks like you are looking for size of the table not tablespace |
nagesh54 wrote
Quote: |
Hi,
Is there any way to find the exact size of a table in DB2 |
Regards
Raghu |
|
Back to top |
|
|
|