I have a little problem with the performance of a mysql-query which uses a fulltext index.
The following query
SELECT Mention.id
FROM mentions AS Mention
WHERE (MATCH (`Mention`.`title_text`, `Mention`.`content_text`, `Mention`.`author_text`)
AGAINST ('"hannover 96"' IN BOOLEAN MODE))
takes about 3 seconds.
If I change the fulltext-condition to
SELECT Mention.id
FROM mentions AS Mention
WHERE (MATCH (`Mention`.`title_text`, `Mention`.`content_text`, `Mention`.`author_text`)
AGAINST ('+hannover +96' IN BOOLEAN MODE))
the query takes just about 0.001 seconds.
So is there a possibility to get a better performance of the first query? It’s important to search for the complete string “hannover 96” and not for records which contain hannover and 96.
Thanks for some tips!
Best regards,
Timo