IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Size of a table in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nagesh54

New User


Joined: 20 Jun 2008
Posts: 30
Location: Hyderabad

PostPosted: Thu Jun 04, 2009 5:27 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 04, 2009 5:33 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 04, 2009 5:47 pm
Reply with quote

Robert,
the TS is a DBA
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 04, 2009 5:49 pm
Reply with quote

Um, no comment, then?
Back to top
View user's profile Send private message
nagesh54

New User


Joined: 20 Jun 2008
Posts: 30
Location: Hyderabad

PostPosted: Fri Jun 05, 2009 11:07 am
Reply with quote

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
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Fri Jun 05, 2009 11:32 pm
Reply with quote

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
View user's profile Send private message
am_ne

New User


Joined: 24 Mar 2007
Posts: 25
Location: Bangalore

PostPosted: Sun Jun 07, 2009 7:57 pm
Reply with quote

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
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Sun Jun 07, 2009 11:26 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top