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 bytes used when inserting a row

Re: how to find bytes used when inserting a row

From: G.H VITTAL <vittal_at_india.hp.com>
Date: Tue, 13 Apr 1999 13:15:17 +0530
Message-ID: <3712F60D.3C38AD08@india.hp.com>


One approach I would like to share use vsize command to get the averge row size and multiply by no of rows.

select avg(vsize(col1)) + avg(vsize(col2)) from table if the table consists of two columns.

regards
vittal

Stephane Faroult wrote:

> butun wrote:
> >
> > Hi
> > i need to know the space occupied in bytes when i insert a new
> > row in a table. Can anybody give be the SQL query which will
> > be able to return the actual size in bytes occupied by the table.
> >
> > This way i could insert a 1000 rows and measure the size before and
> > after to determine the space occupied by each inserted row.
> >
> > thanks
> >
> > Butun
>
> Don't look for a complicated, give-or-take-a-byte formula. Since you
> have a test set, use the ANALYZE TABLE ... COMPUTE STATISTICS command
> instead before and after your insert, and look for results in
> USER_TABLES or DBA_TABLES. What counts with Oracle is chiefly the number
> of Oracle blocks, so the meaningful value is how many rows you will
> store on average in a block, which you can easily derive from columns
> used_blocks and row_count.
> --
> Regards,
>
> Stéphane Faroult
> Oriole Corporation
> ------------------------------------------------------------------
> http://www.oriolecorp.com, designed by Oracle DBAs for Oracle DBAs
> ------------------------------------------------------------------
Received on Tue Apr 13 1999 - 02:45:17 CDT

Original text of this message

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