GATHER STATS FOR TABLE

exec dbms_stats.gather_table_stats (ownname=>’&Owner’,tabname=>’&Table_name’,estimate_percent=>100,block_sample=>true,method_opt=>’FOR ALL COLUMNS size 254′);

ESTIMATE INDEX SIZE

set serveroutput on

declare
l_used_bytes number;
l_alloc_bytes number;
begin
dbms_space.create_index_cost (
ddl => ‘create index test_indx on test (a,b) tablespace users‘,
used_bytes => l_used_bytes,
alloc_bytes => l_alloc_bytes
);
dbms_output.put_line (‘Used Bytes      = ‘||l_used_bytes);
dbms_output.put_line (‘Allocated Bytes = ‘||l_alloc_bytes);
end;
/

Share this post
Recent Posts

Leave a Comment

Start typing and press Enter to search