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

Home -> Community -> Usenet -> c.d.o.server -> Re: Optimizer hint <*+ RULE *> question

Re: Optimizer hint <*+ RULE *> question

From: ThP <tplassart_at_yahoo.fr>
Date: Wed, 09 Nov 2005 21:41:28 +0100
Message-ID: <43725efe$0$19681$8fcfb975@news.wanadoo.fr>


Frank van Bortel a écrit :

> magjez wrote:
> 

>>Hello,
>>
>>I am trying to force a query to run using the Rule Based Optimizer
>>(RBO). The query is fairly complex so I've included the <*+ RULE *>
>>hint in every SELECT statement contained in it. The query contains a
>>UNION ALL. When I run it, the execution plan suggests that it's using
>>the RBO (Optimizer: Hint:RULE) but it is using the CBO. The CBO is
>>causing the query to run much slower. I realize that I should
>>eventually attempt to rewrite the query so that it is optimal for CBO
>>but for the time being I would just like to be able to run the RBO. If
>>I clear the statistics of the database, the default CHOOSE option does
>>the RBO (no hints in query) and the query runs great. Any suggestions
>>as to why the the RULE hint would be ignored? Any ideas on how to force
>>it?
>>
>>Thanks,
>>Maggie
>>
> 
> The only reason I know of for the optimizer to use the CBO,
> even when hinted to use the RBO, is the fact there are
> statistics on (one of) the table(s) involved.
> You may want to drop statistics on all objects involved
> in the query.
> 

Hi,

just a silly question:

do you really type <*+ RULE *> ?
Did you try /*+ RULE*/ ? Received on Wed Nov 09 2005 - 14:41:28 CST

Original text of this message

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