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 do I calculate the size of indexes

Re: How do I calculate the size of indexes

From: Mark D Powell <markp7832_at_my-deja.com>
Date: 2000/04/16
Message-ID: <8dcsv0$8ur$1@nnrp1.deja.com>#1/1

In article <1c7cc2f2.874137a2_at_usw-ex0101-005.remarq.com>,   anurag <aminochaNOamSPAM_at_unibiz.com.invalid> wrote:
> Hi,
> I want to calculate the size of my indexes. Please help me out.
>
> Thanks
> Anurag
>

This is a quick and dirty method but will produce reasonable results

( Database Oracle Block size - overhead of 156 - (pctfree * blk sz) /  3 + average size of each column + 6 (rowid)

This is roughly the number of rows that will fit in a block so divide the expected total number of rows by this number to get your total block count. For speed you can use a constant for the numerator as in 8192 - 156 - 410 (10%) = 7626 so you just use 7626 as your available size / expected row size calculation.

Multiple total block count by size of the block and divide by 1024 to get size in Kilobytes and divide again by 1024 to get Megabytes.

You can improve the final numbers by calculating the actual overhead and ajusting the row size for length bytes but for short rows it won't really make any difference unless you have a lot of rows. The 156 above was an average provided by Oracle in a ver 7 class I took.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Sun Apr 16 2000 - 00:00:00 CDT

Original text of this message

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