我有以下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添加一个索引,但它仍然很慢。