I am having problem with mysql fulltext search. When I change the order of keyword, the search speed changes. For example I have 4 queries, all of them return same result:
1) FAST (1s)
SELECT * FROM table WHERE (MATCH (column_data) AGAINST('+english* +php*' IN BOOLEAN MODE)
2) SLOW (10s)
SELECT * FROM table WHERE MATCH (column_data) AGAINST('+php* +english*' IN BOOLEAN MODE)
3) FAST (1s)
SELECT * FROM table WHERE MATCH (column_data) AGAINST('+php*' IN BOOLEAN MODE) AND (MATCH (column_data)) AGAINST('+english*' IN BOOLEAN MODE))
4) SLOW (10s)
SELECT * FROM table WHERE (MATCH (column_data) AGAINST('+english*' IN BOOLEAN MODE)) AND (MATCH (column_data) AGAINST('+php*' IN BOOLEAN MODE))
How can I optimize it?