Estimate space require for index creation - oracle database script

Estimate space require for index creation - Oracle Database Script.

--Below script is to get the required space for index creation, before actually it is being created. --- Lets check for  create index AODBA.INDEX1 on AODBA.EMP(EMPNO)  SET SERVEROUTPUT ON DECLARE v_used_bytes NUMBER(10); v_Allocated_Bytes NUMBER(10); BEGIN  DBMS_SPACE.CREATE_INDEX_COST ( 'create index AODBA.INDEX1 on AODBA.EMP(EMPNO)', v_used_Bytes, v_Allocated_Bytes ); DBMS_OUTPUT.PUT_LINE('Used Bytes MB: ' || round(v_used_Bytes/1024/1024)); DBMS_OUTPUT.PUT_LINE('Allocated Bytes MB: ' || round(v_Allocated_Bytes/1024/1024)); END; /