Reputation: 11940
I'm trying to match on band names in a DB by excluding 'The'
So a search for 'The Beatles' or 'Beatles' would both succeed.
This is too slow: select * from artists where artist_name LIKE '%beatles';
Better ways to do this? I'd like to avoid having an extra sorting/matching column with 'the' stripped out.
Thanks!
Upvotes: 2
Views: 1171
Reputation: 562270
See my presentation Practical Full-Text Search in MySQL that I did for the MySQL University webinar series.
I compare several solutions, including:
Upvotes: 5
Reputation: 75588
Upvotes: 2
Reputation: 332561
Text searching should be handled using Full Text Search (FTS), either with native FTS or 3rd party (IE Sphinx).
Upvotes: 3