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: Looking for table size estimating tools.

Re: Looking for table size estimating tools.

From: M.Rapier <M.Rapier_at_shef.ac.uk>
Date: 1996/11/20
Message-ID: <56vdbv$vl@bignews.shef.ac.uk>#1/1

In article <56rgg1$b5c_at_maple.ncs.com.sg>, setiawan_at_singnet.com.sg says...

>I'm looking for Excel spread sheet or the like that can automate the
>estimation of Oracle7 table size. Would appreciate if some one willing
>to share it.

I did do it on a spreadsheet agaes ago, but you can use the statistics gathered on Oracle 7 to do the job more easily.

Below is a function that returns the size of a table based on representative data stored within it - just supply the estimated number of rows:

tabown = table owner
tabname = table name
rowest = estimated number of rows

it assumes you've loaded some data in your table & analysed it. It can be called in whatever manner you deem appropriate.

A similar function can be devised for indexes.

Cheers.
Martin.

function tabsize (tabown IN VARCHAR2, tabname IN VARCHAR2,

                  rowest IN INTEGER)
           RETURN NUMBER

is
  result number;
  blocksize integer;
  lavg_space integer;
  lavg_row_len integer;
  lnum_rows integer;

begin Received on Wed Nov 20 1996 - 00:00:00 CST

Original text of this message

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