Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to calculate the size of an index?

Re: How to calculate the size of an index?

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 12 Jan 2004 15:17:55 GMT
Message-ID: <btudr2$bd78h$1@ID-82536.news.uni-berlin.de>

> To calculate the size of a table, I usually use num_rows *
> avg_row_len. But how to I calculate the size of an index? Do I use
> avg_data_blocks_per_key * distinct_key * db_block_size of the
> database?
>
> Please advice. Thank you.

Imho, avg_row_len * num_rows gives you quite a meaningless figure if you want to know the size of a table; if this isn't the case for you, please elaborate further why this figure is interesting.

Equally imho, better would be to calculate the size for a table like

select bytes from user|all_segments where segment_name = 'TABLE_NAME' [and owner = 'OWNER']

The same query can then also be used to find the size for an index.

hth
Rene

-- 
  Rene Nyffenegger
  http://www.adp-gmbh.ch
Received on Mon Jan 12 2004 - 09:17:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US