Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: analyze vs dbms_stats
Not that it directly answers your question, but I see that the method =
differs: you have ANALYZE collecting histograms with 254 buckets on =
indexed columns (and I believe implicitly on every other column with 1 =
bucket), while DBMS_STATS is generating 254-bucket histos on all =
columns.
There are other differences internal to ANALYZE and DBMS_STATs, but this = one jumped out at me.
My $.02,
Rich
Rich Jesse System/Database Administrator rjesse_at_qtiworld.com Quad/Tech Inc, Sussex, WI USA
-----Original Message-----
Sent: Friday, June 25, 2004 11:37 AM
Subject: analyze vs dbms_stats
I'm trying to get our shop to convert from analyze to dbms_stats. I'm running into some "strange" results though and wanted to see if I'm missing something or you have some advice.
analyze command:
ESTIMATE STATISTICS SAMPLE 30
PERCENT
FOR TABLE FOR ALL INDEXES FOR ALL INDEXED COLUMNS SIZE 254
dbms_stats code I'm running:
exec DBMS_STATS.GATHER_TABLE_STATS ( -
ownname =3D> 'STATION_TEST', - tabname =3D> 'MEMBERS', - partname =3D> NULL, -
degree =3D> 0, - granularity =3D> 'DEFAULT', - cascade =3D> TRUE, - stattab =3D> NULL, - statid =3D> NULL, - statown =3D> NULL, -
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.htmlReceived on Fri Jun 25 2004 - 11:46:58 CDT
-----------------------------------------------------------------