How can one optimize %XYZ% queries?
Printable View
How can one optimize %XYZ% queries?
If that's the only thing in your WHERE clause, force the index.
- Chris
yes. how to force index? for the sql
select * from table1 where col1 like %Prod%;
Well, I have no idea what the name of the index is, but supposing you had an index named index1 on table1.col1, then
SELECT /*+ INDEX(T1,INDEX1) */ * FROM TABLE1 T1 WHERE COL1 LIKE '%PROD%'
HTH,
- Chris
[Edited by chrisrlong on 07-27-2001 at 10:01 AM]