Our site has about 40.000 registered members. We have about 800.000 forum posts.
We noticed, that when a member searches the forum, the whole site slows down.
Checking the process list, we can see that the search is stuck in the “Sending data” stage. All other database functions are getting “Locked up”, probably waiting for the search to complete.
Sometimes, this can take over a minute. Which seems way too long. Especially for a user who has to wait that long to see the requested webpage.
The query that “locks up the” table is something similar to this:
SELECT p.topic_id, p.post_id FROM (exp_forum_posts p, exp_forum_topics t) WHERE t.topic_id = p.topic_id AND ( p.forum_id = '6' OR p.forum_id = '7' OR p.forum_id = '27' OR p.forum_id = '28' OR p.forum_id = '29' OR p.forum_id = '15' OR p.forum_id = '9' OR p.forum_id = '20' OR p.forum_id = '10' OR p.forum_id = '34' OR p.forum_id = '11' OR p.forum_id = '12' OR p.forum_id = '26' OR p.forum_id = '30' OR p.forum_id = '13' OR p.forum_id = '21' OR p.forum_id = '16' OR p.forum_id = '22' OR p.forum_id = '24' OR p.forum_id = '33' OR p.forum_id = '31' OR p.forum_id = '32' OR p.forum_id = '35' OR p.forum_id = '36' ) AND (p.body LIKE 'keyword %' OR p.body LIKE '%keyword%') LIMIT 250Is there a way to do the search without locking the other tables?