[NSFW] Problem with a script running over and over
-
Hello
My current host has said that my wordpress website [NSFW] https://www.smoochy.co.uk is using too much resource as a section of code seems to be running constantly and going through all the rows in my database, which is quite large.I have no idea if this is WP code, the theme or a plugin and as im not a developer im struggling to pinpoint what the code is doing and if it is essential?
Is anyone able to give me any idea what the code might be doing or what it is linked to?
# Time: 160312 15:08:52
# User@Host: redoocec_wp004[redoocec_wp004] @ localhost []
# Thread_id: 29 Schema: redoocec_wp004 Last_errno: 0 Killed: 0
# Query_time: 4.274768 Lock_time: 0.000618 Rows_sent: 5 Rows_examined: 77865 Rows_affected: 0 Rows_read: 77865
# Bytes_sent: 6968
SET timestamp=1457816932;
SELECT wp_posts.*, AVG( wp_commentmeta.meta_value ) as average_rating FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
LEFT OUTER JOIN wp_comments ON(wp_posts.ID = wp_comments.comment_post_ID)
LEFT JOIN wp_commentmeta ON(wp_comments.comment_ID = wp_commentmeta.comment_id)
WHERE 1=1 AND (
( wp_postmeta.meta_key = ‘_visibility’ AND CAST(wp_postmeta.meta_value AS CHAR) IN (‘visible’,’catalog’) )
) AND wp_posts.post_type = ‘product’ AND ((wp_posts.post_status = ‘publish’)) AND ( wp_commentmeta.meta_key = ‘rating’ OR wp_commentmeta.meta_key IS null ) GROUP BY wp_posts.ID ORDER BY average_rating DESC, wp_posts.post_date DESC LIMIT 0, 5;
# Time: 160312 19:31:52
# User@Host: redoocec_wp004[redoocec_wp004] @ localhost []
# Thread_id: 950 Schema: redoocec_wp004 Last_errno: 0 Killed: 0
# Query_time: 4.308637 Lock_time: 0.001131 Rows_sent: 5 Rows_examined: 77865 Rows_affected: 0 Rows_read: 77865
# Bytes_sent: 6968
SET timestamp=1457832712;
SELECT wp_posts.*, AVG( wp_commentmeta.meta_value ) as average_rating FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
LEFT OUTER JOIN wp_comments ON(wp_posts.ID = wp_comments.comment_post_ID)
LEFT JOIN wp_commentmeta ON(wp_comments.comment_ID = wp_commentmeta.comment_id)
WHERE 1=1 AND (
( wp_postmeta.meta_key = ‘_visibility’ AND CAST(wp_postmeta.meta_value AS CHAR) IN (‘visible’,’catalog’) )
) AND wp_posts.post_type = ‘product’ AND ((wp_posts.post_status = ‘publish’)) AND ( wp_commentmeta.meta_key = ‘rating’ OR wp_commentmeta.meta_key IS null ) GROUP BY wp_posts.ID ORDER BY average_rating DESC, wp_posts.post_date DESC LIMIT 0, 5;
- The topic ‘[NSFW] Problem with a script running over and over’ is closed to new replies.