Unusual query
-
Hey i have this query that has been eating up all my resources, am using aws and when i spin up to a bigger rds instance the query still uses maximum resources and it makes my website unusable. Could someone help me know what could be making my query to run rogue.
This the query maxing out resources.
SELECT SQL_CALC_FOUND_ROWS mp_posts.ID FROM mp_posts LEFT JOIN mp_term_relationships ON (mp_posts.ID = mp_term_relationships.object_id) INNER JOIN mp_postmeta ON ( mp_posts.ID = mp_postmeta.post_id ) INNER JOIN mp_postmeta AS mt1 ON ( mp_posts.ID = mt1.post_id ) WHERE 1=1 AND (
mp_term_relationships.term_taxonomy_id IN (10)
) AND (
mp_postmeta.meta_key = ‘post_views_count_7_day_total’
AND
( mt1.meta_key = ‘post_views_count_7_day_last_date’ AND CAST(mt1.meta_value AS SIGNED) > ‘1568171797’ )
) AND mp_posts.post_type = ‘post’ AND ((mp_posts.post_status = ‘publish’)) GROUP BY mp_posts.ID ORDER BY CAST(mp_postmeta.meta_value AS SIGNED) DESC LIMIT 30, 5The blog I need help with is: (visible only to logged in users)
-
Hi there,
It looks like you are in the wrong forum. Your site is using the open-source WordPress.org software, you need to seek assistance from WordPress.org forums which can be found at:
https://wordpress.org/support/forums/
These forums are for WordPress.com hosted sites. The difference between the two is explained, here:
- The topic ‘Unusual query’ is closed to new replies.