Recent Topics

v 6.6.7 Performance bottlenecks: userlist would be shown slowly (When there are many users and blogs)

Started by on Feb 04, 2016 – Contents updated: Feb 05, 2016

Feb 04, 2016 06:50    

It's based on the topic : http://forums.b2evolution.net/when-use-for-large-organization-some-features-may
For testing , I created 5000 users; each user gets one own blog; in one blog(blogid=1) there are 10000 posts.

When display the userlist, a sql statement will be excuted slowly, as follows:

SELECT evo_users.user_ID, IF( user_avatar_file_ID IS NOT NULL, 1, 0 ) as has_picture, COUNT( DISTINCT blog_ID ) AS nb_blogs
  FROM evo_users
  LEFT JOIN evo_regional__city ON user_city_ID = city_ID
  LEFT JOIN evo_blogs on user_ID = blog_owner_user_ID
 WHERE user_ID IS NOT NULL
   AND (user_status <> 'closed')
   AND (user_level >= '0')
   AND (user_level <= '10')
 GROUP BY user_ID
 ORDER BY has_picture DESC, user_profileupdate_date DESC, user_lastseen_ts DESC, user_ID ASC

However, when deleting the 'LEFT JOIN evo_blogs' statement, it was executed much quickly.

Feb 04, 2016 23:35

OK thanks. I think this will be easy to optimize ;)

Feb 05, 2016 16:05

There will be an improvement in v 6.6.8 but maximum optimization will only be possible in 6.7.x


Form is loading...

powered by b2evolution free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.