SELECT * FROM `db`
WHERE MATCH (city) AGAINST ('south ban' IN BOOLEAN MODE)
SELECT * FROM 'db'
WHERE city LIKE '%south ban%'
I have 2 queries, one is use Match against, the other is LIKE,
When I try to search 'south bank'
Match
wont return if user type south ban but Like
will return the result
How can I improve Match against search?
I did testing,
(country LIKE '%south%' || state LIKE '%south%' || city LIKE '%south%') &&
(country LIKE '%bank%' || state LIKE '%bank%' || city LIKE '%bank%')
MATCH (country, stateprov, city) AGAINST ('south bank*' IN BOOLEAN MODE)
for 3 millions rows
Match - 69,310 rows - 2.5 sec
LIKE - 67,092 rows - 1.87 sec
How come Like is faster than match?