{"id":1326774,"date":"2017-07-27T01:49:06","date_gmt":"2017-07-27T08:49:06","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/"},"modified":"2017-07-27T01:49:06","modified_gmt":"2017-07-27T08:49:06","slug":"excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/","title":{"rendered":"Excessive executions on server by adminajax.php and\/or slow MySQL queries"},"content":{"rendered":"<p>My site host SiteGround has limited my site due to excessive high number of account executions. With an extended amount of troubleshooting from their tech support, they&#8217;ve identified that the problem is being caused by 2 major things:<\/p>\n<p>1. Excessive amount of executions of this script:<br \/>\nhttp:\/\/enclave.la\/wp-admin\/admin-ajax.php \/home\/enclave5\/public_html\/wp-admin\/admin-ajax.php<\/p>\n<p>They recommended this resource and I completely stopped the WordPress heartbeat:<br \/>\nhttps:\/\/www.siteground.com\/tutorials\/wordpress\/limit-wordpress-heartbeat.htm<\/p>\n<p>However AWStats in control panel stills shows excessive execution of the script and they tell me it means an application is calling it. I did a search for this script in the forum and I see that it gets called by Events Calendar so can you tell me if this is a known issue or reported by other users?<\/p>\n<p>2. They also identified a lot of slow MySQL queries such as the below examples. I tried optimizing the tables with PhPmyadmin but there are still a lot of executions and slow queries. Is this also a known issue or reported by any users?<\/p>\n<p>Furthermore there appears to be a high amount of slow MySQL queries on this database:<br \/>\nCode:<br \/>\n=== Databases Info ==============================================================<br \/>\nDatabase Tables Views InnoDB MyISAM Slow Queries Slowest Query DB Size<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212; &#8212;&#8211; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8211;<br \/>\nenclave5_wp879 37 0 19 18 152 3.641 194.2 MB<\/p>\n<p> Fully optimize the site and the database, since you have a lot of slow MySQL queries:<\/p>\n<p>Code:<br \/>\n=== TOP 10 of 158 (total) Slow Queries for the past 24 hours ==========<br \/>\n1. Executed 14h 29m 10s ago for 9.055575 sec on Database &#8211;&gt; Unknown (NOT FOUND \/ DELETED)<br \/>\nDate: 2017-07-19 11:43:23 Query_time: 9.055575 Rows_examined: 354626: Rows_sent 1 Lock_time: 0.002277<br \/>\n# Schema: enclave5_wp879 Last_errno: 0 Killed: 0 SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id AND mt2.meta_key = &#8216;_EventHideFromUpcoming&#8217; ) LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#8216;_EventEndDate&#8217; ) WHERE 1=1 AND wp_posts.ID NOT IN (28686) AND ( wp_postmeta.meta_key = &#8216;_EventStartDate&#8217; AND ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) &gt; &#8216;2016-03-06 17:00:00&#8217; ) OR ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) = &#8216;2016-03-06 17:00:00&#8217; ) AND mt1.post_id &gt; 28686 ) ) AND mt2.post_id IS NULL ) AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;tribe-ea-success&#8217; OR wp_posts.post_status = &#8216;tribe-ea-failed&#8217; OR wp_posts.post_status = &#8216;tribe-ea-schedule&#8217; OR wp_posts.post_status = &#8216;tribe-ea-pending&#8217; OR wp_posts.post_status = &#8216;tribe-ea-draft&#8217;) GROUP BY wp_posts.ID ORDER BY EventStartDate ASC, wp_posts.ID ASC LIMIT 0, 1;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n2. Executed 14h 29m 8s ago for 7.523023 sec on Database &#8211;&gt; Unknown (NOT FOUND \/ DELETED)<br \/>\nDate: 2017-07-19 11:43:25 Query_time: 7.523023 Rows_examined: 387367: Rows_sent 1 Lock_time: 0.000397<br \/>\n# Schema: enclave5_wp879 Last_errno: 0 Killed: 0 SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id AND mt2.meta_key = &#8216;_EventHideFromUpcoming&#8217; ) LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#8216;_EventEndDate&#8217; ) WHERE 1=1 AND wp_posts.ID NOT IN (50271) AND ( wp_postmeta.meta_key = &#8216;_EventStartDate&#8217; AND ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) &lt; &#8216;2017-05-13 21:30:00&#8217; ) OR ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) = &#8216;2017-05-13 21:30:00&#8217; ) AND mt1.post_id &lt; 50271 ) ) AND mt2.post_id IS NULL ) AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;tribe-ea-success&#8217; OR wp_posts.post_status = &#8216;tribe-ea-failed&#8217; OR wp_posts.post_status = &#8216;tribe-ea-schedule&#8217; OR wp_posts.post_status = &#8216;tribe-ea-pending&#8217; OR wp_posts.post_status = &#8216;tribe-ea-draft&#8217;) GROUP BY wp_posts.ID ORDER BY EventStartDate DESC, wp_posts.ID DESC LIMIT 0, 1;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n3. Executed 15h 6m 46s ago for 7.125177 sec on Database &#8211;&gt; Unknown (NOT FOUND \/ DELETED)<br \/>\nDate: 2017-07-19 11:05:47 Query_time: 7.125177 Rows_examined: 382973: Rows_sent 1 Lock_time: 0.000247<br \/>\n# Schema: enclave5_wp879 Last_errno: 0 Killed: 0 SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id AND mt2.meta_key = &#8216;_EventHideFromUpcoming&#8217; ) LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#8216;_EventEndDate&#8217; ) WHERE 1=1 AND wp_posts.ID NOT IN (49152) AND ( wp_postmeta.meta_key = &#8216;_EventStartDate&#8217; AND ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) &lt; &#8216;2017-04-29 17:30:00&#8217; ) OR ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) = &#8216;2017-04-29 17:30:00&#8217; ) AND mt1.post_id &lt; 49152 ) ) AND mt2.post_id IS NULL ) AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;tribe-ea-success&#8217; OR wp_posts.post_status = &#8216;tribe-ea-failed&#8217; OR wp_posts.post_status = &#8216;tribe-ea-schedule&#8217; OR wp_posts.post_status = &#8216;tribe-ea-pending&#8217; OR wp_posts.post_status = &#8216;tribe-ea-draft&#8217;) GROUP BY wp_posts.ID ORDER BY EventStartDate DESC, wp_posts.ID DESC LIMIT 0, 1;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n4. Executed 14h 29m 19s ago for 7.084176 sec on Database &#8211;&gt; Unknown (NOT FOUND \/ DELETED)<br \/>\nDate: 2017-07-19 11:43:14 Query_time: 7.084176 Rows_examined: 267813: Rows_sent 1 Lock_time: 0.000288<br \/>\n# Schema: enclave5_wp879 Last_errno: 0 Killed: 0 SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id AND mt2.meta_key = &#8216;_EventHideFromUpcoming&#8217; ) LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#8216;_EventEndDate&#8217; ) WHERE 1=1 AND wp_posts.ID NOT IN (28686) AND ( wp_postmeta.meta_key = &#8216;_EventStartDate&#8217; AND ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) &lt; &#8216;2016-03-06 17:00:00&#8217; ) OR ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) = &#8216;2016-03-06 17:00:00&#8217; ) AND mt1.post_id &lt; 28686 ) ) AND mt2.post_id IS NULL ) AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;tribe-ea-success&#8217; OR wp_posts.post_status = &#8216;tribe-ea-failed&#8217; OR wp_posts.post_status = &#8216;tribe-ea-schedule&#8217; OR wp_posts.post_status = &#8216;tribe-ea-pending&#8217; OR wp_posts.post_status = &#8216;tribe-ea-draft&#8217;) GROUP BY wp_posts.ID ORDER BY EventStartDate DESC, wp_posts.ID DESC LIMIT 0, 1;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n5. Executed 14h 29m 54s ago for 6.088 sec on Database &#8211;&gt; Unknown (NOT FOUND \/ DELETED)<br \/>\nDate: 2017-07-19 11:42:39 Query_time: 6.088000 Rows_examined: 337341: Rows_sent 1 Lock_time: 0.001177<br \/>\n# Schema: enclave5_wp879 Last_errno: 0 Killed: 0 SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id AND mt2.meta_key = &#8216;_EventHideFromUpcoming&#8217; ) LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#8216;_EventEndDate&#8217; ) WHERE 1=1 AND wp_posts.ID NOT IN (36678) AND ( wp_postmeta.meta_key = &#8216;_EventStartDate&#8217; AND ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) &lt; &#8216;2016-10-23 12:00:00&#8217; ) OR ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) = &#8216;2016-10-23 12:00:00&#8217; ) AND mt1.post_id &lt; 36678 ) ) AND mt2.post_id IS NULL ) AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;tribe-ea-success&#8217; OR wp_posts.post_status = &#8216;tribe-ea-failed&#8217; OR wp_posts.post_status = &#8216;tribe-ea-schedule&#8217; OR wp_posts.post_status = &#8216;tribe-ea-pending&#8217; OR wp_posts.post_status = &#8216;tribe-ea-draft&#8217;) GROUP BY wp_posts.ID ORDER BY EventStartDate DESC, wp_posts.ID DESC LIMIT 0, 1;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n6. Executed 15h 6m 40s ago for 5.638921 sec on Database &#8211;&gt; Unknown (NOT FOUND \/ DELETED)<br \/>\nDate: 2017-07-19 11:05:53 Query_time: 5.638921 Rows_examined: 239487: Rows_sent 1 Lock_time: 0.000384<br \/>\n# Schema: enclave5_wp879 Last_errno: 0 Killed: 0 SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id AND mt2.meta_key = &#8216;_EventHideFromUpcoming&#8217; ) LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#8216;_EventEndDate&#8217; ) WHERE 1=1 AND wp_posts.ID NOT IN (49152) AND ( wp_postmeta.meta_key = &#8216;_EventStartDate&#8217; AND ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) &gt; &#8216;2017-04-29 17:30:00&#8217; ) OR ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) = &#8216;2017-04-29 17:30:00&#8217; ) AND mt1.post_id &gt; 49152 ) ) AND mt2.post_id IS NULL ) AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;tribe-ea-success&#8217; OR wp_posts.post_status = &#8216;tribe-ea-failed&#8217; OR wp_posts.post_status = &#8216;tribe-ea-schedule&#8217; OR wp_posts.post_status = &#8216;tribe-ea-pending&#8217; OR wp_posts.post_status = &#8216;tribe-ea-draft&#8217;) GROUP BY wp_posts.ID ORDER BY EventStartDate ASC, wp_posts.ID ASC LIMIT 0, 1;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n7. Executed 11h 38m 27s ago for 5.375538 sec on Database &#8211;&gt; Unknown (NOT FOUND \/ DELETED)<br \/>\nDate: 2017-07-19 14:34:06 Query_time: 5.375538 Rows_examined: 325216: Rows_sent 1 Lock_time: 0.000396<br \/>\n# Schema: enclave5_wp879 Last_errno: 0 Killed: 0 SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id AND mt2.meta_key = &#8216;_EventHideFromUpcoming&#8217; ) LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#8216;_EventEndDate&#8217; ) WHERE 1=1 AND wp_posts.ID NOT IN (33846) AND ( wp_postmeta.meta_key = &#8216;_EventStartDate&#8217; AND ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) &gt; &#8216;2016-06-09 19:00:00&#8217; ) OR ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) = &#8216;2016-06-09 19:00:00&#8217; ) AND mt1.post_id &gt; 33846 ) ) AND mt2.post_id IS NULL ) AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;tribe-ea-success&#8217; OR wp_posts.post_status = &#8216;tribe-ea-failed&#8217; OR wp_posts.post_status = &#8216;tribe-ea-schedule&#8217; OR wp_posts.post_status = &#8216;tribe-ea-pending&#8217; OR wp_posts.post_status = &#8216;tribe-ea-draft&#8217;) GROUP BY wp_posts.ID ORDER BY EventStartDate ASC, wp_posts.ID ASC LIMIT 0, 1;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n8. Executed 14h 29m 48s ago for 5.313065 sec on Database &#8211;&gt; Unknown (NOT FOUND \/ DELETED)<br \/>\nDate: 2017-07-19 11:42:45 Query_time: 5.313065 Rows_examined: 220713: Rows_sent 1 Lock_time: 0.001366<br \/>\n# Schema: enclave5_wp879 Last_errno: 0 Killed: 0 SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id AND mt2.meta_key = &#8216;_EventHideFromUpcoming&#8217; ) LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#8216;_EventEndDate&#8217; ) WHERE 1=1 AND wp_posts.ID NOT IN (21207) AND ( wp_postmeta.meta_key = &#8216;_EventStartDate&#8217; AND ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) &lt; &#8216;2015-07-27 21:00:00&#8217; ) OR ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) = &#8216;2015-07-27 21:00:00&#8217; ) AND mt1.post_id &lt; 21207 ) ) AND mt2.post_id IS NULL ) AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;tribe-ea-success&#8217; OR wp_posts.post_status = &#8216;tribe-ea-failed&#8217; OR wp_posts.post_status = &#8216;tribe-ea-schedule&#8217; OR wp_posts.post_status = &#8216;tribe-ea-pending&#8217; OR wp_posts.post_status = &#8216;tribe-ea-draft&#8217;) GROUP BY wp_posts.ID ORDER BY EventStartDate DESC, wp_posts.ID DESC LIMIT 0, 1;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n9. Executed 14h 29m 43s ago for 4.642789 sec on Database &#8211;&gt; Unknown (NOT FOUND \/ DELETED)<br \/>\nDate: 2017-07-19 11:42:50 Query_time: 4.642789 Rows_examined: 401783: Rows_sent 1 Lock_time: 0.000405<br \/>\n# Schema: enclave5_wp879 Last_errno: 0 Killed: 0 SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id AND mt2.meta_key = &#8216;_EventHideFromUpcoming&#8217; ) LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#8216;_EventEndDate&#8217; ) WHERE 1=1 AND wp_posts.ID NOT IN (21207) AND ( wp_postmeta.meta_key = &#8216;_EventStartDate&#8217; AND ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) &gt; &#8216;2015-07-27 21:00:00&#8217; ) OR ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) = &#8216;2015-07-27 21:00:00&#8217; ) AND mt1.post_id &gt; 21207 ) ) AND mt2.post_id IS NULL ) AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;tribe-ea-success&#8217; OR wp_posts.post_status = &#8216;tribe-ea-failed&#8217; OR wp_posts.post_status = &#8216;tribe-ea-schedule&#8217; OR wp_posts.post_status = &#8216;tribe-ea-pending&#8217; OR wp_posts.post_status = &#8216;tribe-ea-draft&#8217;) GROUP BY wp_posts.ID ORDER BY EventStartDate ASC, wp_posts.ID ASC LIMIT 0, 1;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n10. Executed 14h 12m 27s ago for 4.616719 sec on Database &#8211;&gt; Unknown (NOT FOUND \/ DELETED)<br \/>\nDate: 2017-07-19 12:00:06 Query_time: 4.616719 Rows_examined: 351489: Rows_sent 1 Lock_time: 0.000336<br \/>\n# Schema: enclave5_wp879 Last_errno: 0 Killed: 0 SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id AND mt2.meta_key = &#8216;_EventHideFromUpcoming&#8217; ) LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#8216;_EventEndDate&#8217; ) WHERE 1=1 AND wp_posts.ID NOT IN (40784) AND ( wp_postmeta.meta_key = &#8216;_EventStartDate&#8217; AND ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) &lt; &#8216;2016-12-16 20:30:00&#8217; ) OR ( ( mt1.meta_key = &#8216;_EventStartDate&#8217; AND CAST(mt1.meta_value AS DATETIME) = &#8216;2016-12-16 20:30:00&#8217; ) AND mt1.post_id &lt; 40784 ) ) AND mt2.post_id IS NULL ) AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;tribe-ea-success&#8217; OR wp_posts.post_status = &#8216;tribe-ea-failed&#8217; OR wp_posts.post_status = &#8216;tribe-ea-schedule&#8217; OR wp_posts.post_status = &#8216;tribe-ea-pending&#8217; OR wp_posts.post_status = &#8216;tribe-ea-draft&#8217;) GROUP BY wp_posts.ID ORDER BY EventStartDate DESC, wp_posts.ID DESC LIMIT 0, 1;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n","protected":false},"template":"","class_list":["post-1326774","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Excessive executions on server by adminajax.php and\/or slow MySQL queries -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Excessive executions on server by adminajax.php and\/or slow MySQL queries -\" \/>\n<meta property=\"og:description\" content=\"My site host SiteGround has limited my site due to excessive high number of account executions. With an extended amount of troubleshooting from their tech support, they&#8217;ve identified that the problem is being caused by 2 major things: 1. Excessive amount of executions of this script: http:\/\/enclave.la\/wp-admin\/admin-ajax.php \/home\/enclave5\/public_html\/wp-admin\/admin-ajax.php They recommended this resource and I completely [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/\",\"name\":\"Excessive executions on server by adminajax.php and\/or slow MySQL queries -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-07-27T08:49:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Excessive executions on server by adminajax.php and\/or slow MySQL queries\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Excessive executions on server by adminajax.php and\/or slow MySQL queries -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/","og_locale":"en_US","og_type":"article","og_title":"Excessive executions on server by adminajax.php and\/or slow MySQL queries -","og_description":"My site host SiteGround has limited my site due to excessive high number of account executions. With an extended amount of troubleshooting from their tech support, they&#8217;ve identified that the problem is being caused by 2 major things: 1. Excessive amount of executions of this script: http:\/\/enclave.la\/wp-admin\/admin-ajax.php \/home\/enclave5\/public_html\/wp-admin\/admin-ajax.php They recommended this resource and I completely [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/","name":"Excessive executions on server by adminajax.php and\/or slow MySQL queries -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-07-27T08:49:06+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/excessive-executions-on-server-by-adminajax-php-andor-slow-mysql-queries\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Excessive executions on server by adminajax.php and\/or slow MySQL queries"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1326774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1326774\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1326774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}