2007-02-26, 10:59 PM
I checked a user profile and it's execution time was above 2.x seconds and on numerous tries, it varies from 1.5 - 2.x seconds.
The problem is here:
I guess this query is being used to calculate users post percentage in the forum (well, its logic don't make me reach any other conclusion). You could use something from the datacache to reduce the execution time, significantly, over here.
Ohh, and it was noticed in the middle of testing, fixing, redoing (repeat!) of MyBB Merge system, for a forum with over 450,000 posts. So that probably means it happens on big databases only.
The problem is here:
SELECT COUNT(pid) AS posts FROM mybb_posts WHERE visible > 0
table type possible_keys key key_len ref rows Extra
mybb_posts ALL 476218 Using where
Query Time: 1.2976210
I guess this query is being used to calculate users post percentage in the forum (well, its logic don't make me reach any other conclusion). You could use something from the datacache to reduce the execution time, significantly, over here.
Ohh, and it was noticed in the middle of testing, fixing, redoing (repeat!) of MyBB Merge system, for a forum with over 450,000 posts. So that probably means it happens on big databases only.