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: SQL fast, PL/SQL slow, optimizer confused.

Re: SQL fast, PL/SQL slow, optimizer confused.

From: boa <root_at_localhost.net>
Date: Mon, 01 Mar 2004 21:29:30 GMT
Message-ID: <_WN0c.42759$BD3.8140184@juliett.dax.net>


srivenu wrote:

> Set the init.ora parameter _like_with_bind_as_equality=TRUE.
> Even Oracle APPS recommends it.
> This will cause the optimizer to favour the Index scan for LIKE
> predicates.
> Normally LIKE predicates with binds (since it is PL/SQL) will have a
> selectivity of 5%. So the optimizer may go in for FTS depending on
> other factors.
> If you set _like_with_bind_a_esquality=TRUE then the optimizer will
> evaluate the selectivity of the LIKE predicate the same as a EQUALITY
> predicate.
> (The selectivity of the clause c1 = :bind1 (Num of Rows - Num of Nulls
> in column c1) / (Number of Distinct Values).)
>
> regards
> Srivenu

Thanks!

Bjørn Received on Mon Mar 01 2004 - 15:29:30 CST

Original text of this message

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