Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Analyze vs. DBMS_STATS

RE: Analyze vs. DBMS_STATS

From: Toepke, Kevin M <ktoepke_at_trilegiant.com>
Date: Thu, 10 Jan 2002 08:25:52 -0800
Message-ID: <F001.003EC6BA.20020110075535@fatcity.com>

I would highly recommend that you move to DBMS_STATS if you are running at least 8.1.6.3 -- especially if you are estimating statistics.

The reason is that DBMS_STATS generates more and better statistics than analyze. I've seen queries go from hours to minutes just by changing from ANALYZE to DBMS_STATS...

There are a couple situations where you don't want to use DBMS_STATS -- when you are using partitioned function-based indexes. DBMS_STATS doesn't seem to do right. Just another issue with function-based indexes that is supposed to be fixed in 9.0.2.

Caver

-----Original Message-----
Sent: Thursday, January 10, 2002 10:31 AM To: Multiple recipients of list ORACLE-L

Now that I finally have all of our databases upgraded to 8.1.7 I am taking some time to look at our method of gathering statistics for CBO. It looks like I should move towards using DBMS_STATS to gather statistics, but I may want to use ANALYZE if I need to gather stats on individual columns (according to Note:166215.1). I was just curious to know if most DBAs are using DBMS_STATS instead of ANALYZE. For the most part, I had been using DBMS_UTILITY.ANALYZE_SCHEMA. I'll probably start using DBMS_STATS.GATHER_SCHEMA_STATS unless somebody convinces me otherwise. Any comments or things that I should watch out for?

Thanks,

Jay Hostetter
Oracle DBA
D. & E. Communications
Ephrata, PA USA

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Jay Hostetter
  INET: jhostetter_at_decommunications.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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Toepke, Kevin M
  INET: ktoepke_at_trilegiant.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 Jan 10 2002 - 10:25:52 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US