I just gave a quick look at the mysql.log file for an arcade.php call.
The user table has thousands of entries and full scan can take a long time.
I found this SELECT in the log:
SELECT user.userid, user.avatarid, user.avatarrevision, avatar.avatarpath, NOT ISNULL(filedata) AS hascustom, customavatar.dateline FROM user AS user LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid WHERE customavatar.userid=1 OR user.userid=1
It includes user.avatarid that should be indexed.
I will try to check the queries thoroughly to find bottlenecks later.
EXPLAIN SELECT command can help.
|