Subject RE: [firebird-support] Performance differenz by 20 times between gpre and IBOconsole
Author Leyne, Sean

> > LIKE operator is able to use index only if the pattern does
> > not start with wildcard:
> > myfield LIKE 'abc%'
> > If you have command that has its pattern as parameter
> > myfield LIKE ?
> > than during prepare of such command FB has no idea what
> > the actual value will be when executing it (whether is will
> > start with wildcard
> > or not), hence the plan can't use index.
> >
> Finally the engine does see the parameter too.
> Hopefully Firebird 2.x will have another optimization stage to get
> this pitfall.

I can't say that it will be fixed in v2.0.

I can, however, report that this was discussed at the Fulda conference
this week and that a couple of different approaches to improve the
performance of the LIKE operator, when the field is indexed, where