Subject Re: [ib-support] How to optimize LIKE criteria
Author Paul Reeves
Michael Fung wrote:

> I know MySQL can use index in this case. but IB/FB cannot.

Are you sure about this?

select first_name, last_name
from employee
where last_name like 'Ree%';

PLAN (EMPLOYEE INDEX (NAMEX,LN_FN_IDX,LN_FN_DESC_IDX))

FIRST_NAME LAST_NAME
=============== ====================

Roger Reeves


Firebird (and InterBase) have optimised LIKE 'Str%' to use an index for
as long as I can remember.


Paul
--

Paul Reeves
http://www.ibphoenix.com
Supporting users of Firebird and InterBase