[英]mysql faster way of matching an inner string
I'm trying to match on band names in a DB by excluding 'The' 我试图通过排除“The”来匹配数据库中的波段名称
So a search for 'The Beatles' or 'Beatles' would both succeed. 所以搜索“甲壳虫乐队”或“甲壳虫乐队”都会成功。
This is too slow: select * from artists where artist_name LIKE '%beatles'; 这太慢了:从艺术家中选择*,其中artist_name LIKE'%beatles';
Better ways to do this? 更好的方法来做到这一点? I'd like to avoid having an extra sorting/matching column with 'the' stripped out. 我想避免使用'the'剥离的额外排序/匹配列。
Thanks! 谢谢!
See my presentation Practical Full-Text Search in MySQL that I did for the MySQL University webinar series. 请参阅我的演示文稿MySQL中的实用全文搜索 ,我为MySQL大学网络研讨会系列所做的。
I compare several solutions, including: 我比较了几种解决方案,包括:
应使用全文搜索(FTS)处理文本搜索,使用本机FTS或第三方(IE Sphinx)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.