The effects of alcohol on
sustanon 250 leucine for β real weight loss & bodybuilding benefits?
Limited Support
Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.
We appreciate your patience and understanding while our team is away. Thank you for being part of the wpDiscuz community!
Merry Christmas and Happy Holidays! π
How-to and Troubleshooting
(@isrdll)
Active Member
Joined: 4 years ago
The following SQL query uses "NOT IN" and takes a long time to process if there are a large number of comments. Can you improve it?
Β
SELECTΒ SQL_CALC_FOUND_ROWS wp_comments.comment_ID
FROMΒ wp_comments
WHEREΒ ( ( comment_approved = '0'
ORΒ comment_approved = '1' ) )
ANDΒ comment_post_ID = 22849
ANDΒ comment_typeΒ NOTΒ INΒ ('wpdiscuz_sticky')
ANDΒ comment_parent = 0
ORDERΒ BYΒ wp_comments.`comment_ID` asc
LIMITΒ 0,11
Β
WpdiscuzCore->_getWPComments()
wp-content/plugins/wpdiscuz/class.WpdiscuzCore.php:827
WpdiscuzCore->getWPComments()
wp-content/plugins/wpdiscuz/class.WpdiscuzCore.php:774
(@asti)
Illustrious Member
Joined: 8 years ago
We'll discuss this with our team and take it into consideration for future versions.Β
(@isrdll)
Joined: 4 years ago
Active Member
Posts: 4
Sep 28, 2021 2:11 pm
@astiΒ
The following query is also slow.
WpdiscuzCore->getStickyComments():
SELECTΒ SQL_CALC_FOUND_ROWS wp_comments.comment_ID
FROMΒ wp_comments
WHEREΒ ( ( comment_approved = '0'
ORΒ comment_approved = '1' ) )
ANDΒ comment_post_ID = 23016
ANDΒ comment_typeΒ INΒ ('wpdiscuz_sticky')
ANDΒ comment_parent = 0
ORDERΒ BYΒ wp_comments.`comment_ID` asc
When I create "comment_type" index on "comments" table, WpdiscuzCore->getStickyComments() improves the speed, but the first query I presented does not improve the speed. Probably because using "NOT IN".
(@isrdll)
Joined: 4 years ago
Active Member
Posts: 4
Sep 28, 2021 2:20 pm
@asti
And I don't want to create a "comment_type" index, because I never use "stick" and there are no "wpdiscuz_sticky" comments in the "comments" table.