Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Size of a table in DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Size of a table in DB2
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jun 04, 2009 5:33 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu Jun 04, 2009 5:47 pm    Post subject:
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jun 04, 2009 5:49 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Size of a table in DB2
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    Post subject:
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    Post subject: Reply to: Size of a table in DB2
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us