Jai
I couldn't follow all the details of your calculation. I would have
expected to see a calculation for the number of rows per block. Once you
know how many rows you can pack into a block, then you can estimate the
number of blocks you will need. Maybe you have it in there and I just
couldn't see it this early on a Monday morning.
As a sanity check, do the simple bytes/row * no. of rows and make sure
you are reasonably close.
Looking at the bigger picture, I wouldn't get too picky about this.
Usually your number of rows is only a guess anyway. Spend your time looking
at LMT and uniform extents. Oracle is trying to save us from time-consuming
tasks like this. :-)
Dennis Williams
DBA, 40%OCP, 100% DBA
Lifetouch, Inc.
[EMAIL PROTECTED]
-----Original Message-----
Sent: Sunday, March 16, 2003 10:09 PM
To: Multiple recipients of list ORACLE-L
Dear All,
I have a task on hand to size a database for our application. I have used
the Oracle rule to find out the rowsize of rows in a table.
1. Space available for the data (SAD) = data block size - block
header size = db_block_size - kcbh - ub4 - ktbbh - (initrans
-1)* ktbit - kdbh
2. Available Data Space (ADS) = ceil(SAD * (1-pctfree/100)) - kdbt
3. Space used per row (SPR) = (Total size of the columns data length)
+ (1 byte per column with length < 250 )+ (3 * 1 byte per
column with length >= 250)
4. Row Size (ROWSZ) = 3 * ub1 + SPR
5. Space used per row(SPROW) = max(ub1 * 3 + ub4 + sb2, ROWSZ) + sb2
6. Total Size of the table = Expected Number of records * SPROW
I hope this formula is correct.
How can I do the sizing of indexes. Shouldn't I take into account the 10
bytes consumed by the ROWID pseudocolumn apart from the column(s) that are
indexed ?
TIA for all your help.
Best Regards
Jai
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: DENNIS WILLIAMS
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).