Okay, I found MySQL was bogging down, checked processlist, and what do you know, saw 80+ threads, most of them locked by a few queries. Guess what:
Yes, we have a poorly-formulated query. Using temporary, using filesort. Awards extension disabled until I can figure out how to optimize this.Code:mysql> EXPLAIN SELECT a.*, au.*, post.userid, post.postid FROM post AS post INNER JOIN award_user AS au ON (au.userid=post.userid) INNER JOIN award AS a ON (a.award_id=au.award_id) WHERE 1=1 GROUP BY au.issue_id ORDER BY au.issue_time DESC; +----+-------------+-------+--------+---------------+---------+---------+-------------------------+-------+---------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+--------+---------------+---------+---------+-------------------------+-------+---------------------------------+ | 1 | SIMPLE | au | ALL | NULL | NULL | NULL | NULL | 117 | Using temporary; Using filesort | | 1 | SIMPLE | a | eq_ref | PRIMARY | PRIMARY | 2 | totalwar_vb.au.award_id | 1 | Using where | | 1 | SIMPLE | post | ref | userid | userid | 4 | totalwar_vb.au.userid | 25005 | Using where | +----+-------------+-------+--------+---------------+---------+---------+-------------------------+-------+---------------------------------+ 3 rows in set (0.01 sec)




Reply With Quote