tags:

views:

494

answers:

2

I'm trying to calculate the size of a few tables as stated here, but I can't find the block header size variable

How do I get it? Is it some kind of formula?

I'm using Oracle 10g

A: 

This page (for 10g) says it's 57 bytes.

paxdiablo
I saw that, but I think it's just one part of the "whole block header"
Juan Manuel
The block header size is 57 bytes, did you mean the block size?
paxdiablo
Or the actual overhead which is discussed on that page as well (block header, transaction header, table directory, ...)?
paxdiablo
+2  A: 

This site has a good discussion on the format of the block header: http://www.adp-gmbh.ch/ora/concepts/db_block.html. Basically the block header = fixed header + transaction header + table directory + row directory. Here are the individual pieces:

fixed header = 57 bytes

transaction header = between 23*inittrans and 23*maxtrans

table directory = 4*number of tables (usually 1 unless you're using clusters)

row directory = 2*stored rows

In short while you can come up with a rough estimate, it's not a fixed size for each data block.

Shawn Loewen
Those "=" chars, I assume they're meant to be "+" chars, yes?
paxdiablo
I edited the answer to make the formatting a bit clearer.
Shawn Loewen
Okay, looks like that's what the Q'er was after, +1.
paxdiablo