Alan Tai <alantai> wrote: >I wonder how to speed up the response time of SQL statements like " SELECT * >FROM table1 WHERE field1 LIKE 'A%' OR field2 LIKE 'A%';" and " SELECT COUNT(*) >FROM table1 WHERE field1 LIKE 'A%' OR field2 LIKE 'A%';".
>I wonder how to speed up the response time of SQL statements like " SELECT * >FROM table1 WHERE field1 LIKE 'A%' OR field2 LIKE 'A%';" and " SELECT COUNT(*) >FROM table1 WHERE field1 LIKE 'A%' OR field2 LIKE 'A%';".
The 'Like' statement is the problem - it *never* uses an index. If you need to handle this sort of stuff regularly consider building your own hash key for 'field1', 'field2' and using '=' instead of 'like' Received on Sat Feb 03 1996 - 00:00:00 CET
Original text of this message