set echo on;
rem ********************************************************************
rem * Author            : Rick Kupcunas
rem * Original          : 18-MAY-95
rem * Description       : Computes the size of an index
rem * Usage             : start sz_ndx_1.sql <date>  e.g. 03-MAR-95
rem *                                        <Program Name>
rem *                                        <Max run time (min.)>
rem *
rem ********************************************************************

spool sz_ndx_1.rslt;

set pagesize 60;
set linesize 132;

select greatest(4, (1.01) *
        (((&&NUMBER_OF_ROWS * (&&LOAD_PERCENT/100.)) /
         ((floor(((&&BLOCK_SIZE - 113 - (&&INITTRANS * 23)) *
          (1 - (&&PERCENT_FREE/100.))) / ((10 + &&UNIQUENESS) +
           &&NUMBER_OF_COLUMNS + (&&INDEX_LENGTH)))))) * 2))
from DUAL;

undefine NUMBER_OF_ROWS;
undefine LOAD_PERCENT;
undefine BLOCK_SIZE;
undefine INITTRANS;
undefine PERCENT_FREE;
undefine UNIQUENESS;
undefine NUMBER_OF_COLUMNS;
undefine INDEX_LENGTH;

set echo off;
spool off;
commit;
