Subject FB 2.1.1 LIKE via STARTING WITH using upper index
Author intellekta
Hi,

In the firebird faq i read this
Q: Why doesn't LIKE 'A%' always behave the same as STARTING WITH 'A'?
A: This is a known problem in Firebird optimizer and has been fixed in
Firebird 2.1.

i use a table with a computed index:
-- CREATE INDEX IDX_M_UPNNAME ON M COMPUTED BY (UPPER (NNAME))

a)
SELECT * FROM M WHERE UPPER(NNAME) STARTING WITH UPPER('z')
-- PLAN (M INDEX (IDX_M_UPNNAME))

b)
SELECT * FROM M WHERE UPPER(NNAME) LIKE UPPER('z%')
-- PLAN (M NATURAL)

2.1.1 optimizer problem ?

Thanks in advance
Uwe