Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Optimizer Question

Re: Optimizer Question

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 16 Dec 1998 21:35:46 GMT
Message-ID: <367c265d.19772351@192.86.155.100>


A copy of this was sent to imrad_at_icubed.com (if that email address didn't require changing) On Wed, 16 Dec 1998 17:54:50 GMT, you wrote:

>I'm using a Oracle 8.0.4. Database on a Unix system and using the Cost Based
>Optimizer. When I submit a select statement does Oracle use only the Cost
>Based Optimizer OR does it use a combination of the Cost Based and Rule Bases
>Optimizers without any hints?
>
>I was told that Oracle uses both Cost Based and Rule Based Optimizers on the
>select statement at the same time with the database running in Cost Based
>mode.
>

In general:

1- if any of the tables referenced in the query has been analyzed -- CBO is used.

2- if the query has a hint in it (other then the RULE hint) -- CBO is used.

3- if the optimizer mode for the session is set to cbo, CBO is used.

otherwise, if none of the tables are analyzed and the query has no hints and the optimizer mode is RULE or choose -- Rule is used.

CBO and RBO are mutually exclusive and are not used simultaneously.

>I'm trying to confirm if the above statement is true or just B.S.
>
>Thanks
>
>Russ
>imrad_at_icubed.com
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Dec 16 1998 - 15:35:46 CST

Original text of this message

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