Bill,

There are some good notes on Metalink about why CBO avoids using an index
when one is available.   I'll see if I can find a note number but you might
try searching on index and optimizer.

Sometimes you need to modify the code in order to get better performance
under CBO.   Can you test modified code.  Harrison has a good book Oracle
SQL High-Performance Tuning which is very good.  Burleson also has a book
Oracle High-Performance SQL Tuning which is very good.

If you're not under tremendous schedule pressure, I'd recommend that you
tune the poorly performing SQL to run better under CBO.  RBO is not getting
any new features and will eventually go away.   CBO continues to evolve and
get better so if this is a new project, it's best to start out with CBO, in
my opinion.

If you have to, you can set the entire database to CBO and then add
rule-based hints to the poorly-performing statements, if there aren't too
many of them.   That is, if you have the capability to add hints.

Cherie Machler
Oracle DBA
Gelco Information Network


                                                                                       
                              
                    "Magaliff, Bill"                                                   
                              
                    <Bill.Magaliff@len       To:     Multiple recipients of list 
ORACLE-L <[EMAIL PROTECTED]>     
                    dware.com>               cc:                                       
                              
                    Sent by:                 Subject:     Cost vs Rule                 
                              
                    [EMAIL PROTECTED]                                                   
                              
                                                                                       
                              
                                                                                       
                              
                    03/07/02 01:23 PM                                                  
                              
                    Please respond to                                                  
                              
                    ORACLE-L                                                           
                              
                                                                                       
                              
                                                                                       
                              




I work in a dev shop - most of the sql is canned and pretty basic.  We've
been running CBO in all of our dev environments, but we have a few long
txns
that just take forever.  At the request of some savvy developers, I turned
on RBO, and it brought down execution times dramatically.

I've been analyzing affected tables often (we do a lot of bulk load/unload
for testing), and have played with partitioning and clustering,
particularly
on one table that's just a dog.  CBO will always do a FTS where RBO uses
the
PK to retrieve data.

Where to go next?  I've been unable to alter the costs dramatically enough
to make any real difference in execution time.

thx

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Magaliff, Bill
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to