Re: Execution Order of SQL Query

From: Zoom Zoom Zoom <nospam_at_nospam.com>
Date: Tue, 23 Oct 2001 04:56:46 GMT
Message-ID: <iM6B7.57913$gT6.29686683_at_news1.rdc1.sfba.home.com>


The default optimizer used in Oracle (I guess 8 and above) is Choose. There are four Optimizer modes (rule,first_rows,all_rows and choose) that you can select from: CHOOSE, CBO or Rule Based.

If the optimizer is set to Choose, then for any query, Oracle will try to see if there are any statistics available for a table. If not, it will use rule based optimizer.

One quick way to find what optimizer is the server is using by issuing following query as a user who has access to v$parameter data dictionary view:

SELECT name, value FROM v$parameter WHERE name like 'optimizer_mode%';

If it shows first_rows or all_rows then it's using cbo. If it's showing rule then it's using Rule based optimizer. If choose then the default mode.

  • Zoom

"andrija" <ar35644_at_fer.hr> wrote in message news:9r0fk7$5mb7$1_at_as201.hinet.hr...
> > It depends how your Oracle server is configured. If it's using CBO (Cost
> > based optimizer), it wouldn't matter the sequencing of the tables in the
> > FROM clause. If it's Rule-Based then it would.
>
> How can I check wether my Oracle is using CBO or Rule - Based?
>
>
Received on Tue Oct 23 2001 - 06:56:46 CEST

Original text of this message