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: Cost Based Optimizer

Re: Cost Based Optimizer

From: Bryan Lenihan <lenihan_at_bellsouth.net>
Date: Mon, 07 Dec 1998 10:40:40 GMT
Message-ID: <366BB036.9157C1F6@bellsouth.net>


Jerry,

You might want to use a more specific hint, for example /*+ ALL_ROWS */ this will tell the SQL statement which cost based optimization that you want. You can also use /*+ FIRST_ROW */ hint to get another cost based optimization.

If you are wanting to use RULE for majority of your SQL, I would keep your database init.ora file to RULE this way you can use the ANALYZE tool to help you maintain your database. Just remember that the RULE based optimizer is counting it days.

Thanks, and hope this helps,
Bryan Lenihan

Jerry wrote:

> I have a query against a view that is very slow in RULE, but fast in cost.
> But for other reasons I want to run the database in RULE. When I re-create
> the view with a /*+ CHOOSE */ hint and run it under RULE mode, EXPLAIN_PLAN
> will execute it differently in the database under CHOOSE mode, without the
> hint on the view.
>
> Is this behavior normal? BTW, all tables have statistics estimated in both
> scenarios.
>
> Thanks.


Received on Mon Dec 07 1998 - 04:40:40 CST

Original text of this message

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