Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Analyze
Ron,
I use:
DBMS_Utility.Analyze_Schema(Schema => 'OurSchema' ,Method => 'ESTIMATE' ,Estimate_Percent => 5 );
Using 'COMPUTE' would take forever since our largest table has 27 million rows and many others are in the 2 to 10 million row range. Also, our DB is very dynamic, with LOTS of inserts and updates each day, so we need to re-analyze daily.
'COMPUTE' looks at all the rows in all the tables and all the rows in all their indexes - that's why it takes so long. Why not try 'ESTIMATE' with 5 percent? If that's fast, up it to 10 percent, then 20...until it takes too long for your "analyze window". BTW, you get very satisfactory statistics with low sample percentages.
I'd still like to know how to make DBMS_Stats "do the right thing", though. 8^)
Jack
-----Original Message-----
L.
Sent: Monday, July 16, 2001 6:21 PM
To: Multiple recipients of list ORACLE-L
Here is the syntax I am using:
execute dbms_utility.analyze_schema('PROD','COMPUTE');
Is there anything that might have made the analyze run so long? By the way, we are running 7.3.4.
Ron
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jack C. Applewhite INET: japplewhite_at_inetprofit.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-LReceived on Mon Jul 16 2001 - 18:28:57 CDT
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
![]() |
![]() |