Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to calculate table size in 8i

Re: How to calculate table size in 8i

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Tue, 09 Jul 2002 23:08:20 -0800
Message-ID: <F001.004933AD.20020709230820@fatcity.com>


"CHAN Chor Ling Catherine (CSC)" wrote:
>
> Hi Gurus,
>
> I found an article in metalink 105765.1 "How to Determine Approximate Hard
> Drive Space Needed for a Specific Table". The formula for disk space is
> simply multiplying the average row length (by analyzing the table) * the
> number of rows in the table. It's very different from Metalink 10640.1
> "Extent and Block Space Calculation and Usage in V7 Database" where it takes
> the block header etc in considerations but of course, article 10640.1 is for
> Version 7.
>
> How do you gurus calculate table space in Version 8 ? Please advise.
> Thanks.
>
> Regds,
> New Bee
>

Catherine,

    IMHO having a *rough* idea of the size of a table, and more precisely about its rate of growth is more than enough. AFAIK the block structure, for regular, heap organized tables at least, has not changed much since V7 so the V7 recipes still hold. If you have data to analyze, it's probably much easier to have a look at 'blocks', compute how many rows you have per block on average, and then derive the size needed in some distant future. If you have no significant data to talk off, you can roughly consider that the space available in a block is the block size minus 100 to 150 bytes of header, from which you must take PCTFREE off. This gives you a number of bytes ready to store data, which you can divide by an estimate of your row length plus 5 bytes of row overhead to get an approximate number of rows per block.   Personally, I don't find this exercise very interesting. You have so many incertainties at all levels (what is the *average* length of this VARCHAR2(500) or number column?), not least the number of lines expected (I have seen estimates wrong by 60%) that I find it safer to label tables 'small', 'medium', 'big', 'huge', have enough disks (do not forget 60% for indexes, rollback segments and comfortable temp space) and then, at least in the beginnings, check whether everything goes as expected.

-- 
Regards,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (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).
Received on Wed Jul 10 2002 - 02:08:20 CDT

Original text of this message

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