like queries [message #20997] |
Fri, 05 July 2002 05:39 |
Jez
Messages: 6 Registered: July 2002
|
Junior Member |
|
|
We have a lot of queries of the type
Select ... where col1 like '%search text%';
Which causes full table scans. Does anyone know how I can make it use an index.
thanks
Jez
|
|
|
Re: like queries [message #21010 is a reply to message #20997] |
Fri, 05 July 2002 21:48 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
Since you are looking for a word or phrase in the middle of a column, Oracle Text (interMedia) is your best option here. Once you have created a special type of index on this column, it will be used and will avoid a full-table scan. Your query would then look like:
where col1 contains('search text') > 0
|
|
|