9.2 Script to Remove Histograms on Oracle Banking Trade Finance Schema

Following script would have to be executed in the Oracle Banking Trade Finance schema if there are any rows:

declare

cursor cur_tables is

select distinct table_name

from

(

select table_name from user_tab_columns where histogram!='NONE'

);

begin

for rec_tables in cur_tables

loop

dbms_stats.gather_table_stats(ownname=>USER,tabname=>rec_tables.table_name,METHOD_OPT=>'FOR ALL COLUMNS SIZE

1',CASCADE=>TRUE,DEGREE=>2,ESTIMATE_PERCENT=>NULL);

end loop;

end;