DB2 - table sizes

30 January,2010 by Jack Vamvas

The idea of table sizes in DB2 , can spawn into a wide ranging conversation . This is a quicj script tha I use to output the DB2 table sizes, comparing used and allocated space.

select char(date(t.stats_time))||' '||char(time(t.stats_time)) as
statstime
,substr(t.tabschema,1,4)||'.'||substr(t.tabname,1, 24) as tabname
, card as rows_per_table
, decimal(float(t.npages)/ ( 1024 / (b.pagesize/1024)),9,2) as used_mb
, decimal(float(t.fpages)/ ( 1024 / (b.pagesize/1024)),9,2) as
allocated_mb
from syscat.tables t
, syscat.tablespaces b
where t.tbspace=b.tbspace
with ur;

 Ref:Jack Vamvas(http://www.dba-db2.com)

 

Author: Jack Vamvas(http://www.dba-db2.com)

Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on DB2 - table sizes

Comments are moderated, and will not appear until the author has approved them.


dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright