Search code examples
sqloracle-databasefull-text-searchsql-like

Index for efficient full text search using "LIKE" syntax


I have an application which sends queries like the following to the database:

x like '%abc%'

I can't modify these queries, but I can index the underlying tables. Is there any way to put a full text index on a table such that double open-ended like queries can be performed without a full scan?


Solution

  • No, there is no way to make LIKE predicates with wildcards avoid a table-scan so they perform well for full-text search. You must use Oracle Text features and modify your queries to use text-searching predicates.

    See Oracle® Text Application Developer's Guide