Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Block Header Size Confusion
"Dereck L. Dietz" <dietzdl_at_ameritech.net> wrote in message
news:qa2ah.254$Py2.90_at_newssvr27.news.prodigy.net...
> In reading a study guide for Oracle 9i it described the data block
> headers.
> One item it mentions is the Row Directory which it states occupies (4 *
> the
> number of rows) bytes.
>
> The other book I used to get the formula I have been using to
> "guestimate"
> table/index sizing was the Oracle 8 DBA Manual and it just had the block
> overhead as 90 for tables and 161 for indexes.
>
> My question is probably a simple one and I apologize if it is but when it
> states (4 * the number of rows) am I correct in thinking it is referring
> to
> the number of rows in the data BLOCK and not the entire table?
>
> Another question is, isn't this a Catch-22 situation? It seems that in
> order to know what the block overhead is you need to know how many rows
> will
> be in the block; but in order to know how many rows will fit in the
> block
> you need to know the free bytes in the block (block size minus the block
> overhead).
>
> Thanks.
>
>
It's open to argument whether you should label the row directory as part of the block header - and it looks as if your second source has not done so.
The row directory is 2 bytes per row.
For tables, there is also a 3-byte per row overhead in-line with the row; and for indexes where is a 2-byte row overhead in-line with the row. Possibly somewhere in the row-overheads your first source has managed to invent the 4 bytes for the row-directory.
-- Regards Jonathan Lewis http://jonathanlewis.wordpress.com Author: Cost Based Oracle: Fundamentals http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.htmlReceived on Mon Nov 27 2006 - 10:20:23 CST