Subject Re: RE slow execution of LIKE
Author csswa
Right you are. I misread Ben's post. Thought it said that *both*
were using an index.

Regards,
Andrew Ferguson
-- Press SPACEBAR once to quit or twice to save changes.


--- In ib-support@y..., "Jason Chapman (JAC2)" <jason@j...> wrote:
> It's because the query parser can't decide at the point of planning
whether
> you are about to supply a:
> LIKE %GALA% or a GALA%. The first can't use an index and the
second can.
>
> Cheers,
>
> JAC.
>
>
> ""csswa"" <csswa@y...> wrote in message
> news:ag9t5u+cdn4@e...
> >
> > The implication here is that the overhead of parameterizing makes
the
> > procedure run 15+ times slower. I dunno -- maybe it's reasonable
to
> > assume 15 extra instructions/clock ticks are required to
manipulate
> > the :param instead of a simple constant like 'GLAX%'.
> >
> > Out of curiosity, Ben, try is with STARTING WITH in place of LIKE.
> > Sorry, I don't have an explanation for you, but some experimenting
> > may yield more clues.
> >
> > Regards,
> > Andrew Ferguson
> > -- I never said I had no idea about most of the things you said I
> > said I had no idea about.
> >
> >
> > --- In ib-support@y..., "Ben Johnson" <ben_johns@r...> wrote:
> > > Hi,
> > >
> > > Yes, if I use LIKE :sString it is taking 00:00:00:0930
> > > seconds
> > >
> > > But if I hardcode it like LIKE 'GLAX%' it takes only
> > > 00:00:00:0050 seconds!
> > > Ben
> > >
> > >
> > > On Sun, 07 Jul 2002 Thomas Steinmaurer wrote :
> > > >Ben,
> > > >
> > > > > Thanks for your reply.
> > > > >
> > > > > I am using only 'GLAX%', sString can be 'G%' or 'GL%' or
> > > > > 'GLA%', the plan tab in IBConsole shows it is using index.
> > > >
> > > >So the query should be fast enough. Is there any other problem
> > > >with the LIKE clause?
> > > >
> > > >
> > > >Regards,
> > > >Thomas Steinmaurer
> > > >IB LogManager 2.0 - The Logging/Auditing Tool for InterBase and
> > > >Firebird
> > > >http://www.iblogmanager.com
> > > >
> > > >
> > > >------------------------ Yahoo! Groups Sponsor
> > > >
> > > >To unsubscribe from this group, send an email to:
> > > >ib-support-unsubscribe@e...
> > > >
> > > >
> > > >
> > > >Your use of Yahoo! Groups is subject to
> > > >http://docs.yahoo.com/info/terms/
> > > >
> > > >
> > >
> > > _________________________________________________________
> > > There is always a better job for you at Monsterindia.com.
> > > Go now http://monsterindia.rediff.com/jobs
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > ib-support-unsubscribe@e...
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >