This is the query I'm using to perform a forum search.
$sql = "SELECT t.title, t.user_id, t.replies, t.views, t.last_poster_name, t.last_post_time, a.username
FROM fm_topics t
LEFT JOIN fm_replies r
ON t.t_id=r.topic_id
LEFT JOIN account a
ON t.user_id=a.id
WHERE
`title` LIKE '%" . sanitize($search_string) . "%' OR
`content` LIKE '%" . sanitize($search_string) . "%'
GROUP BY t_id LIMIT 0, 10";
The above works fine. However, it takes like 5+ seconds to load. Now, if I take out the part where it searches for the title too, it loads way faster (obviously). My question is, how can I improve this query? how would you rewrite it for better performance?