MyBB Community Forums

Full Version: Profile view page, a bit unfair on execution time!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:
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.
Yeh we noticed that on http://www.ncaabbs.com/forums/ncaa/mybb/ too. It'll use the stats cache in the next release.