Like and index

View: New views
1 Messages — Rating Filter:   Alert me  

Like and index

by Philippe Makowski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

SELECT myfield LIKE 'A%' use index
SELECT myfield STARTING WITH 'A' use index

SELECT myfield STARTING WITH 'A' OR myfield STARTING WITH 'B' use index
SELECT myfield LIKE 'A%' OR myfield LIKE 'B%' does not use index

I thought that for the optimizer, LIKE 'A%' is equivalent to STARTING
WITH 'A', it seems that is not true when there is an OR




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-test mailing list
Firebird-test@...
https://lists.sourceforge.net/lists/listinfo/firebird-test
LightInTheBox - Buy quality products at wholesale price!