why there is cost when I am running with RULE hint or optimizer_goal=RULE

why there is cost when I am running with RULE hint or optimizer_goal=RULE

Post by dr » Wed, 22 May 2002 05:26:51



Hi

I have this problem, I run a pretty big query under choose and rule
and both shows costs in explain plan. I thought in RULE we dont see
costs whatsoever?
Also under RULE the explain plan shows hash join but then again I
thought hash join can only be used in CBO?

Am I missing something?

 
 
 

why there is cost when I am running with RULE hint or optimizer_goal=RULE

Post by Hemant K Chital » Wed, 22 May 2002 23:01:36


Do you have a Hint in the query ?
Do you  have parallelism (DEGREE > 1) on any of the Tables in the query ?
Is the query really running in RULE (maybe you have a login.sql
which does an ALTER SESSION SET OPTIMIZER_MODE='CHOOSE') ?

Hemant K Chitale


Quote:> Hi

> I have this problem, I run a pretty big query under choose and rule
> and both shows costs in explain plan. I thought in RULE we dont see
> costs whatsoever?
> Also under RULE the explain plan shows hash join but then again I
> thought hash join can only be used in CBO?

> Am I missing something?


 
 
 

why there is cost when I am running with RULE hint or optimizer_goal=RULE

Post by Thomas Kyt » Thu, 23 May 2002 01:24:06




Quote:

>Hi

>I have this problem, I run a pretty big query under choose and rule
>and both shows costs in explain plan. I thought in RULE we dont see
>costs whatsoever?
>Also under RULE the explain plan shows hash join but then again I
>thought hash join can only be used in CBO?

>Am I missing something?

You are using some feature that forces CBO such as:

o table with non-default degree of paralellism
o partitioned table
o index organized table
...

or you might have a query with a hint in it.

--

Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp

 
 
 

why there is cost when I am running with RULE hint or optimizer_goal=RULE

Post by dr » Thu, 23 May 2002 07:13:58


yes... a composite partitioned table is involved, guess that was the problem

thank you




> >Hi

> >I have this problem, I run a pretty big query under choose and rule
> >and both shows costs in explain plan. I thought in RULE we dont see
> >costs whatsoever?
> >Also under RULE the explain plan shows hash join but then again I
> >thought hash join can only be used in CBO?

> >Am I missing something?

> You are using some feature that forces CBO such as:

> o table with non-default degree of paralellism
> o partitioned table
> o index organized table
> ...

> or you might have a query with a hint in it.