Recent Topics

1 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.

3 Feb 04, 2016 23:35

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

4 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...