Xref: alice comp.databases.oracle.misc:46654 comp.databases.oracle.server:73647
Path: alice!news-feed.fnsi.net!netnews.com!feed2.nntp.acc.ca!feed.nntp.acc.ca!news.ican.net!not-for-mail
From: "John Chiu" <johnymc@netscape.net>
Newsgroups: comp.databases.oracle.server,comp.databases.oracle.misc
Subject: Re: How to find the size of a table?
Date: Thu, 11 Nov 1999 20:03:41 -0500
Organization: ICAN.Net Customer
Lines: 33
Message-ID: <80fovg$fah$1@news2.tor.accglobal.net>
References: <80bpon$obk$1@nnrp1.deja.com> <80c23b$unv$1@nnrp1.deja.com>
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300

The formula for calculating storage space for a row =
              average row size (get from sys.dba_tables or
                                           select  avg(vsize(col1))+
avg(vsize(col2)) +.......... from your_table; )
           + number of columns
           + number of columns > 250 characters
           + 3 bytes of row header

HTH

John Chiu

> If you analyze the table the statistics in sys.dba_tables will give you
> the average row size.  If you really want to know for a specific row
> then I think you can estimate it by summing a vsize function for each
> column plus adding the row overhead which you will have to calculate
> based on the datatypes.  Sort of fixed row overhead of 3 + length bytes
> + sum(vsize(col1) + vsize(col2) etc...)
>
> I can not remember if the overhead information is in the Concepts or
> the DBA manual, but it is documented.
> > Thanks,
> > Daivd
> >
> --
> 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.


