SELECT wp_posts.*,
wp_geodir_gd_event_detail.* ,
wp_geodir_gd_event_detail.*,
wp_geodir_event_schedule.*
FROM wp_posts
LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)
INNER JOIN wp_geodir_gd_event_detail ON (wp_geodir_gd_event_detail.post_id = wp_posts.ID)
INNER JOIN wp_geodir_event_schedule ON (wp_geodir_event_schedule.event_id = wp_posts.ID)
WHERE 1=1 AND (wp_term_relationships.term_taxonomy_id IN (24))
AND wp_posts.post_type IN ('post', 'oht_article', 'nav_menu_item', 'tribe_events', 'gd_place', 'maxgallery', 'gd_employee_listings', 'gd_event', 'gd_property', 'gd_classifieds', 'gd_classified', 'oht_pdf', 'gd_pickup_location')
AND ((wp_posts.post_status = 'publish'))
GROUP BY wp_posts.ID,wp_geodir_event_schedule.event_date
ORDER BY wp_geodir_event_schedule.event_date asc, wp_geodir_event_schedule.event_starttime asc , wp_geodir_gd_event_detail.is_featured asc, wp_posts.post_date desc, wp_posts.post_title LIMIT 0, 50
The request above is causing 10-20 minute SQL calls on one of our sites. One of the pages that uses it is ‘events/events/’.
I am trying to locate where it’s being called from. Can you advise? We are going to need to modify it as its slowing down the entire server.
WP 4.9x / Geodirectory 1.6.38 / Events 1.4.6