How can I replace/speed up a text search query which uses LIKE ?
Posted
by
Jules
on Stack Overflow
See other posts from Stack Overflow
or by Jules
Published on 2010-12-20T19:07:40Z
Indexed on
2010/12/21
6:54 UTC
Read the original article
Hit count: 324
I'm trying to speed up my query...
select PadID from Pads WHERE (keywords like '%$search%' or
ProgramName like '%$search%' or English45 like '%$search%') AND
RemovemeDate = '2001-01-01 00:00:00' ORDER BY VersionAddDate DESC
I've done some work already, I have a keywords table so I can add
... PadID IN (SELECT PadID FROM Keywords WHERE word = '$search') ...
However its going to be a nightmare to split up the words from English45 and ProgramName into a word table.
Any ideas ? EDIT : (also provided actual table names)
© Stack Overflow or respective owner