在MySQL中进行全文搜索的最有效方法 [英] Best efficient way to make a fulltext search in MySQL

查看:106
本文介绍了在MySQL中进行全文搜索的最有效方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有3个表格,我想查询一个搜索词条文本框。我的查询目前看起来像这样:

  SELECT Artist。* FROM艺术家,乐队,乐器WHERE MATCH(Artist.name)反对('mysearchterm')或MATCH(Band.name)AGAINST('mysearchterm')或MATCH(Instrument.name,Instrument.description)AGAINST('mysearchterm'); 

这个查询花费了太多的时间来执行。有什么办法可以改善吗?我做错了什么?



谢谢

全文搜索引擎,而不是试图优化这一点。



http://www.sphinxsearch.com/about.html


I have 3 tables, and I want to make a query for a search term textbox. My query currently looks something like this:

SELECT Artist.* FROM Artist, Band, Instrument WHERE MATCH (Artist.name) AGAINST ('mysearchterm') OR MATCH (Band.name) AGAINST ('mysearchterm') OR MATCH (Instrument.name, Instrument.description) AGAINST ('mysearchterm');

This query is taking too much time to get executed. Is there any way to improve this? Am I doing something wrong?

Thanks

解决方案

I would move to a fulltext search engine instead of trying to optimize this.

http://www.sphinxsearch.com/about.html

这篇关于在MySQL中进行全文搜索的最有效方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆