try -
where SuchName *STARTING WITH* :SuchName1;

On Mon, Mar 24, 2008 at 12:17 PM, Slavomir Skopalik <[EMAIL PROTECTED]>
wrote:

> Hi,
> the LIKE statement is very complex and in some cases it can used index.
> .. WHERE aaa LIKE 'aaa%'
>
> and in outher not:
>
> ... WHERE aaa LIKE '% aaa'
>
> SP must create plan when you are preparing statament and this is before
> sending parameters.
> In second case, you run SQL on fly and in this case the plan is prepared
> when on fly is prepared (when sp is running).
>
> Summary, use other statement instead LIKE.
> LIKE must be used very carefully on big tables :).
> Also if autor will send execution plan this will be more helpfull then
> only
> general question.
>
> BTW: I think on the holiday we can be litle offtopic :))
> BTW2: And because I'm lazy I don't subcribe support list yet :((
>
>        Slavek
>
> > > Hi,
> > > this  is because LIKE operator in general case CAN'T use a
> > index. You
> > > must equal or other operator instead.
> > >
> > >     Slavek
> > >
> > > PS:  Like in this case is dangerou because huge performance
> >  penalty
> > > (try  use second case with SuchName='%').
> >
> > Hi Slavek,
> >
> > isn't the problem on other side?
> >
> > AFAIU the problem, the first procedure (without exec stmt)
> > runs very slowly and the second (same statement, but only
> > executed thru exec
> > stmt) runs fast. Or did I miss something?
> >
> > BTW We're little bit OT in this list.
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to