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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to find the size of a table?

Re: How to find the size of a table?

From: John Chiu <johnymc_at_netscape.net>
Date: Thu, 11 Nov 1999 20:03:41 -0500
Message-ID: <80fovg$fah$1@news2.tor.accglobal.net>


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.
Received on Thu Nov 11 1999 - 19:03:41 CST

Original text of this message

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