We help IT Professionals succeed at work.
Get Started

It is posible to calculate the table size in MB or GB from a DB2 Schema?

NikoVanO
NikoVanO asked
on
2,600 Views
Last Modified: 2012-05-09
Hi,

I'm wondering if there is a way to calculate or estimate the table sizes for tables under a specific schema?

For example I extracted the data from the follow sql into a excel file:

select * from SYSSTAT.TABLES where TABSCHEMA = "TEST"

Now I would like to calculate the sizes of each table or at least to have an estimate. I do not have access to DBA Tools.

I'm asking because I found some calculations on the web that make me think is posible.

"Calculating table space size with AVGROWLEN
 Using the maximum row size, you get the following results:
Usable page size = 4074 × 0.95 = 3870 bytes
Records per page = MIN(MAXROWS, FLOOR(3870 / 130)) = 29
Pages used = 2 + CEILING(100000 / 29) = 3451
Total pages = FLOOR(3451 × 21 / 20) = 3624
Estimated number of kilobytes = 3624 × 4 = 14496 KB"

Thanks,

P.S. I'm new with DB2
Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE