Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Statistics - using dbms_stats breaks the query
Okay ... here is the problem ...
We have our DB (8161) running in RULE mode. Due to some schema using Context, we need to analyze a bunch of tables, but the table has optimizer mode set to RULE.
We used to do 'exec dbms_utility.analyze_schema('<schema>,'COMPUTE');' for a long time. Lately it doesn't finish, so I changed it to ESTIMATE. The database and certain queries were okay, running within limits.
Then one day (my mistake), I changed the scripts to use dbms_stats to do the analyze instead of dbms_utility.analyze_schema. This broke some of our critical and large reports. These reports run in 20 mins, but after using dbms_stats, it took the reports > 2.5 hours to finish.
I assume, dbms_utility.analyze_schema(), 'alter table analyze', and dbms_stats are same and do the same thing. So, why do the reports work fine when using the former 2 and a re dead slow when using dbms_stats ?? What is so different in 'analyze table' and 'dbms_stats' ??
Any hints, ideas are gratefully accepted.
Thanks in advance
Raj
QOTD: Any clod can have facts, but having an opinion is an art!
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jamadagni, Rajendra INET: Rajendra.Jamadagni_at_espn.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Aug 08 2002 - 13:48:34 CDT
- text/plain attachment: ESPN_Disclaimer.txt