If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Index Size Calculation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-25-09, 11:17
aurindam aurindam is offline
Registered User
 
Join Date: May 2009
Posts: 10
Index Size Calculation

Using DB2 9.5...
In the control center I see some statistics related to Index-Sizes. I want to know how the sizes are calculated.
Can someone tell me what are the queries used to calculate those figures.
Thanks.
Reply With Quote
  #2 (permalink)  
Old 05-25-09, 12:35
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
You can query the DB2 catalog tables to retrieve the number of index levels and number of leaf pages. Furthermore, you can determine the average key length and the page size for index pages. Based on that, you can determine the fan-out on a single index level: page size / avg key length. This and the index tree height gives you the estimated number of non-leaf nodes.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 05-26-09, 06:44
aurindam aurindam is offline
Registered User
 
Join Date: May 2009
Posts: 10
well....
I believe I can pick number of index levels (NLEVELS) and number of leaf pages (NLEAF) from SYSCAT.INDEXES and pagesize (PAGESIZE) from SYSCAT.TABLESPACES .
I am not sure abt the key-length thing that u r talking about. Can u please elaborate..?? Moreover I could not arrange the things into a formula to get those figures I see at my control center.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On