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: Should we stop analyzing?

RE: Should we stop analyzing?

From: Mark Richard <mrichard_at_transurban.com.au>
Date: Tue, 30 Dec 2003 14:34:25 -0800
Message-ID: <F001.005DB494.20031230143425@fatcity.com>

I had a similar situation once working in a data warehouse environment. One example is a job that recreated a large dimension table each night:

The dimension table was truncated and reconstructed in phases - this was by far the most efficient approach. It was necessary to analyze the table part way through the building phase though. Doing analyze at this particular point provided a massive performance increase. We could have probably worked around it with hints but it was easier to just analyze the table at particular points within the build script. A quick estimate was all that was required and the couple of seconds spend analyzing could shave maybe 30 minutes off the execution time. A final estimate at the end of the batch meant that the stats were then valid until the next time the table was rebuilt.

                                                                                                                                       
                      "Whittle Jerome                                                                                                  
                      Contr NCI"                To:       Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>                  
                      <Jerome.Whittle_at_sc        cc:                                                                                    
                      ott.af.mil>               Subject:  RE: Should we stop analyzing?                                                
                      Sent by:                                                                                                         
                      ml-errors_at_fatcity.                                                                                               
                      com                                                                                                              
                                                                                                                                       
                                                                                                                                       
                      31/12/2003 03:09                                                                                                 
                      Please respond to                                                                                                
                      ORACLE-L                                                                                                         
                                                                                                                                       
                                                                                                                                       




I'll see your 'analyzed every 4 hours' and raise you one. We have some tables that are analyzed every time they are used! They are 'work' tables that are sometimes empty, very full, or somewhere in between. Running something when the statistics say the table is full but actually is empty takes a little longer when CBO says use indexes; however, if CBO thinks the table is empty and does a FTS when there's actually a million records, well let's just say it takes a while. Hints work sometimes; however, analyzing these table after they are populated and letting CBO do it's job usually works best.

Two points.

First this particular database had not been analyzed for over a year when I got there and this database gets larger daily. They added indexes but it didn't make much difference. After analyzing, most things were much faster; however, the 'work' tables started acting up depending on their state when analyzed. We now analyze twice a month.

Second when it comes to these 'work' tables, I wasn't there and it wasn't my idea!

Jerry Whittle
ASIFICS DBA
NCI Information Systems Inc.
jerome.whittle_at_scott.af.mil
618-622-4145

      -----Original Message-----
      From:   Rachel Carmichael [SMTP:wisernet100_at_yahoo.com]


      I have you beat.... one schema in one of our databases (9.2.0.2) is
      analyzed every 4 hours. Not mine, and I *will* be talking to the DBA
      about his reasoning...


      however Jonathan's point may well be the reason. This is an
      ever-growing database, frequent insert and updates, and sequences are

      used throughout.
       Analyze is "estimate" at least.


      --- "Jamadagni, Rajendra" <Rajendra.Jamadagni_at_espn.com> wrote:

> Mogens, if you are looking for a poster boy ...
>
> We analyze 9 production databases ... *every day*.
> Raj
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Privileged/Confidential information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such a case, you should destroy this message and kindly notify the sender by reply e-mail or by telephone on (03) 9612-6999 or (61) 3 9612-6999. Please advise immediately if you or your employer does not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Transurban Infrastructure Developments Limited and CityLink Melbourne Limited shall be understood as neither given nor endorsed by them.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mark Richard
  INET: mrichard_at_transurban.com.au

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Tue Dec 30 2003 - 16:34:25 CST

Original text of this message

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