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

RE: Analyze

From: Jack C. Applewhite <japplewhite_at_inetprofit.com>
Date: Mon, 16 Jul 2001 16:28:57 -0700
Message-ID: <F001.0034BA20.20010716160022@fatcity.com>

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



Jack C. Applewhite
Database Administrator/Developer
OCP Oracle8 DBA
iNetProfit, Inc.
Austin, Texas
www.iNetProfit.com
japplewhite_at_inetprofit.com
(512)327-9068

-----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-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 Mon Jul 16 2001 - 18:28:57 CDT

Original text of this message

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