Mysql全文搜索按字段搜索(不是分数)性能加快

时间:2014-03-10 12:03:06

标签: mysql sql performance indexing full-text-search

我有以下mysql查询:

SELECT field1,field2 FROM search_table 
WHERE MATCH(field1,field2,field3,fieldx) 
AGAINST ('+string1 +string2' IN BOOLEAN MODE)

field1,field2,fieldx为全文索引。查询以50k记录快速运行。像0.001

这样的东西

我需要按field1,field2等订购。但是当我像这样添加ORDER BY field1时:

SELECT field1,field2 FROM search_table 
WHERE MATCH(field1,field2,field3,fieldx) 
AGAINST ('+string1 +string2' IN BOOLEAN MODE) 
ORDER BY field1 ASC

速度降至0.1。我怎样才能加快这个查询?我试图向field1添加一个索引,但它仍然很慢。

0 个答案:

没有答案