Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to calculate the size of an index?
> 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.chReceived on Mon Jan 12 2004 - 09:17:55 CST
![]() |
![]() |