Ana,
Ana Choto wrote:
Yesterday I posted a question regarding dbms_stats and analyze. A developer was running analyze compute on some tables because a report wouldn't run unless he analyzed compute statistics on those tables. I received great responses from the list, for which I'm really thankful. The developer now is using dbms_stats and the report works just fine.
The only thing is that he still has to run dbms_stats even after the daily job that gathers statistics finishes because the report doesn't work. I'm gathering schema stats with the following options:
exec dbms_stats.gather_schema_stats(ownname=>'DATATEL',options=>'GATHER AUTO',degree=>8,cascade=>TRUE,method_opt=>'FOR ALL COLUMNS SIZE 1');
This is done on all the datawarehouse schemas and the dbms_stats job runs after the daily load has finished. If I understand correctly 'gather auto' collects statistics for those tables that have experienced a 10% change or more. I have checked these tables and they have been analyzed. But, the report still won't run until the developer reanalyzes (now with dbms_stats) those tables. He runs dbms_stats with the following options:
exec dbms_stats.gather_table_stats(owname=>'DATATEL',tabname=>'<table_name>',cascade=>TRUE,method_opt=>'FOR ALL COLUMNS SIZE 1');
-- Regards
Wolfgang Breitling Centrex Consulting Corporation www.centrexcc.com -- //www.freelists.org/webpage/oracle-l