Hi!
My site is experiencing heavy lagging caused by these 2 queries below:
1st query:
SELECT sx5p1B_comments.comment_ID FROM sx5p1B_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 30920 AND user_id = 107563 AND comment_type != 'order_note' AND comment_type != 'webhook_delivery' ORDER BY sx5p1B_comments.comment_date_gmt DESC LIMIT 0,1
2nd query:
SELECT count(p.ID) FROM sx5p1B_posts as p LEFT JOIN sx5p1B_postmeta as pm ON pm.post_id = p.ID WHERE pm.meta_key = 1 and p.post_status = 'publish' and p.post_type = 'course'
What queries is that?
How to optimize the 2 queries?