Slow sql requests
-
Hello.
There are several slow SQL-requests every day on my website.
For example:SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (276) ) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date
OR
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) INNER JOIN wp_postmet a AS mt2 ON ( wp_posts.ID = mt2.post_id ) WHERE 1=1 AND ( ( ( wp_postmeta.meta_key = 'event_date_refresh' AND wp_postmeta.meta_value = 'on' ) ) OR ( ( mt1.meta_key = 'event_date_start' AND CAST(mt1.meta_value AS DATE) <= '2022-03-01' ) AND ( mt2.meta_key = 'event_date_end' AND CAST(mt2.meta_value AS DATE) >= '2022-02-21' ) ) ) AND ((wp_posts.post_type = 'event' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled'))) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date
I am trying to find the source of these requests, and
wp_posts.post_status = 'acf-disabled'
is the reason why I decided to create a topic here.
Both post statusespublish
andacf-disabled
appear in theacf_get_raw_field_groups()
method of the plugin. Tell me please, what is the purpose of this method and how can I find the concrete page or other place or action on my website which generates such a request.
Best regards, MaxRGB.
- The topic ‘Slow sql requests’ is closed to new replies.