By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,611 Members | 1,711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,611 IT Pros & Developers. It's quick & easy.

how to caculate the total size of an index?

P: n/a
just feel puzzled. I can know the nleaf and nlevel value from the
catalog info but how can I get the total space occupied by an index?

thank you~

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I can get some info from control center, but how can I know the total
size of 100+ indexes?

Nov 12 '05 #2

P: n/a
I use the following script:

db2 "select substr(idx.indschema,1,18) as indschema,
substr(idx.indname,1,18) as indname,idx.fullkeycard
as fullkeycard, idx.nleaf as nleaf,tbs.pagesize as
pagesize,(cast(idx.nleaf as bigint) * tbs.pagesize)/1024
as kbytes from syscat.indexes idx,syscat.tablespaces tbs where
idx.tbspaceid = tbs.tbspaceid and
idx.indschema = '<idxschema>' and idx.indname = '<idxname>'"

or
and idx.indname in ('ind1','ind2',...)

Nov 12 '05 #3

P: n/a
Bohne, thanks for your scripts.

nleaf indicates the number of leafies, but for an index, there's
non-leaf overhead; more, some leavies is possibly empty...

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.