Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Objects Sizes
REM
REM SYSTEM : TOM
REM
REM TITLE : Index Sizing Utility
REM
REM MODULE : idx_siz.sql
REM
REM AUTHOR : Sanjay Mathew
REM
REM Overview: : Finds the Size in MB Assumes PCTFREE = 10 REM Block Sz = 8192 REM INITRANS = 2(Default) REM REM Arguments : No of Cols, Row Size , No of Rows REM REM Calls: REM REM Change History: REM REM Ver Date Amended by Reason REM --- ---- ---------- ------ REM 1.0 110697 S Mathew Initial REM REM Copyright (C) 1997 Sanjay Mathew REM REM ********************************************************* prompt accept v_no_cols number prompt 'Enter the No of Columns Less than 129 bytes : ' prompt accept v_avg_row_size number prompt 'Enter the Average Row Size : ' prompt accept v_no_rows number prompt 'Enter the Number of Rows : 'prompt
set verify off
col v_rows_per_blk new_value v_rows_per_blk col v_size new_value v_size col v_rows_per_blk heading "Rows Per Block " col v_size heading "Total Size in MB "
set term off
set head off
REM
REM Calculate the Number of Rows Per Block
REM
select 7229/(8 + &v_no_cols*1 + &v_avg_row_size ) v_rows_per_blk
from dual;
REM
REM Calculate the Number of MB
REM
select &v_no_rows*8192/(&v_rows_per_blk*1024*1024) v_size
from dual ;
set term on
select 'Total Space Required in MB : '||&v_size from dual ;
set head on
exit
REM End of Script
--Received on Mon Dec 15 1997 - 00:00:00 CST