Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Looking for table size estimating tools.
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
lavg_space integer; lavg_row_len integer; lnum_rows integer;