RE: analyze table versus DBMS_STATS.GATHER_TABLE_STATS(...)

  • From: "Justin Cave" <justin@xxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 12 Jul 2004 03:06:42 -0600

That shouldn't be terribly surprising.  I'm not sure what books you are
referring to-- they may be stating that they server the same purpose.

Oracle has deprecated the use of the ANALYZE command and recommends that you
use the DBMS_STATS package to gather statistics.  In addition to being able
to operate in parallel, DBMS_STATS generally gathers "better" statistics
than ANALYZE.   


Justin Cave
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Raphael A. Bauer
Sent: Tuesday, July 06, 2004 2:15 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: analyze table versus DBMS_STATS.GATHER_TABLE_STATS(...)

Hi Folks,

I got a really interesting topic about 9i.
I encountered a big difference in the performance of my sql commands wether
I use analyze table (..) or DBMS_STATS.GATHER_TABLE_STATS(...)
(both "full" analyzes). DBMS_STATS is in my case about 40secs faster than
analyze... The plan of both sql queries stayed the same, only the costs
differed a bit. My Oracle Books say that DBMS_STAT and analyze.. 
are qute the same. But that's not reality...
A - I forgot - my test schema is only one simple table. Nothing to do with
partitions or more complex topics...

I don't want to show you my exact tables and queries. They are not so
important. More important is: Where are those 40secs hidden - and what is
the real difference of DBMS_STATS.GATHER_TABLE_STATS and analyze.

Thanks a lot!

Raphael
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx put
'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------




----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: