Recent Topics

Feb 04, 2016 07:27    

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 comments list,two sql statement will be excuted very slowly, as follows:


SELECT COUNT( comment_ID)
  FROM evo_comments
  LEFT JOIN evo_items__item_settings as expiry_setting ON iset_item_ID = comment_item_ID
   AND iset_name = "comment_expiry_delay"
 WHERE ( ( ( ( comment_status = 'private'
   AND comment_author_user_ID = 1 )
    OR comment_status IN ( 'published','community','protected','review' ) ) ) )
   AND (comment_type IN ('comment','trackback','pingback'))
   AND (comment_item_ID IN (1,2,3,4,5,6,7,8,9,10,11,........,10000)) // from 1 to 10000, most part of numbers omit
   AND (expiry_setting.iset_value IS NULL
    OR expiry_setting.iset_value = ""
    OR TIMESTAMPDIFF(SECOND, comment_date, '2016-02-04 12:31:31') < expiry_setting.iset_value)

SELECT comment_ID
  FROM evo_comments
  LEFT JOIN evo_items__item_settings as expiry_setting ON iset_item_ID = comment_item_ID
   AND iset_name = "comment_expiry_delay"
 WHERE ( ( ( ( comment_status = 'private'
   AND comment_author_user_ID = 1 )
    OR comment_status IN ( 'published','community','protected','review' ) ) ) )
   AND (comment_type IN ('comment','trackback','pingback'))
   AND (comment_item_ID IN (1,2,3,4,5,6,7,8,9,10,.........,10000)) // from 1 to 10000, most part of numbers omit
   AND (expiry_setting.iset_value IS NULL
    OR expiry_setting.iset_value = ""
    OR TIMESTAMPDIFF(SECOND, comment_date, '2016-02-04 12:31:31') < expiry_setting.iset_value)
 ORDER BY comment_date DESC, comment_ID DESC
 LIMIT 20

Feb 05, 2016 16:06

Optimization of this will only be possible in version 6.7.x

Feb 05, 2016 16:46

@fplanque wrote earlier:

Optimization of this will only be possible in version 6.7.x

Ok
I am going to use 6.7 for it has more attractive features which I am testing now.
Thank you!


Form is loading...

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