MySQL Query wp_tec_occurrences.occurrence_id + 10000000
-
My server overloaded by MySQL Queries – MAJOR BUSINESS DISRUPTION!
I am sitting now with 195 identical connections the longest of which is 12972 seconds. Almost 4 hours.
Please at least tell me what I need to shut down so I can minimize the destruction this is causing my site and my business.
This issue is at least 2 months old on my site with my first related ticket on May 10th.
The page I need help with: [log in to see the link]
-
Same here.
My webserver is maxed out over the last month, showing hundreds of faults.
Multiple large TEC SQL queries are the culprit.
I’m using TEC Pro which uses 10-30 events (most recurring) per month on a low-moderate traffic website.
Is there any strategy anyone can suggest to mitigate this?
Typical query reproduced here: (this is a single query!!)
SELECT SQL_CALC_FOUND_ROWS (MD9fC_tec_occurrences.occurrence_id + 10000000) as occurrence_id |
FROM MD9fC_posts |
JOIN MD9fC_tec_occurrences ON MD9fC_posts.ID = MD9fC_tec_occurrences.post_id |
WHERE 1=1 AND MD9fC_posts.post_type = 'tribe_events' AND ((MD9fC_posts.post_status = 'publish'))AND MD9fC_tec_occurrences.occurrence_id IN ( |
SELECT MD9fC_tec_occurrences.occurrence_id |
FROM MD9fC_tec_occurrences |
INNER JOIN MD9fC_tec_series_relationships ON MD9fC_tec_series_relationships.event_post_id = MD9fC_tec_occurrences.post_id |
INNER JOIN ( |
SELECT relationship.series_post_id, MAX(MD9fC_tec_occurrences.end_date) occurrence_date |
FROM MD9fC_tec_occurrences |
INNER JOIN MD9fC_tec_series_relationships as relationship ON relationship.event_post_id = MD9fC_tec_occurrences.post_id |
WHERE CAST(MD9fC_tec_occurrences.end_date AS DATETIME) < '2023-07-15 00:00:00' | GROUP BY relationship.series_post_id | ) results_by_series ON results_by_series.series_post_id = MD9fC_tec_series_relationships.series_post_id AND results_by_series.occurrence_date = MD9fC_tec_occurrences.end_date | UNION DISTINCT | SELECT MD9fC_tec_occurrences.occurrence_id | FROM MD9fC_tec_occurrences | LEFT JOIN MD9fC_tec_series_relationships as relationship ON relationship.event_post_id = MD9fC_tec_occurrences.post_id | WHERE CAST(MD9fC_tec_occurrences.end_date AS DATETIME) < '2023-07-15 00:00:00' | AND relationship.event_post_id IS NULL | ) | GROUP BY MD9fC_tec_occurrences.occurrence_id | ORDER BY MD9fC_tec_occurrences.start_date DESC, MD9fC_tec_occurrences.duration DESC, MD9fC_posts.post_date ASC | LIMIT 600, 151 | SELECT (MD9fC_tec_occurrences.occurrence_id + 10000000) as occurrence_id | FROM MD9fC_posts | JOIN MD9fC_tec_occurrences ON MD9fC_posts.ID = MD9fC_tec_occurrences.post_id | WHERE 1=1 AND ( | CAST(MD9fC_tec_occurrences.start_date AS DATETIME) > '2023-09-15 23:59:59' |
) AND MD9fC_posts.post_type = 'tribe_events' AND ((MD9fC_posts.post_status = 'publish'))AND MD9fC_tec_occurrences.occurrence_id IN ( |
SELECT MD9fC_tec_occurrences.occurrence_id |
FROM MD9fC_tec_occurrences |
INNER JOIN MD9fC_tec_series_relationships ON MD9fC_tec_series_relationships.event_post_id = MD9fC_tec_occurrences.post_id |
INNER JOIN ( |
SELECT relationship.series_post_id, MIN(MD9fC_tec_occurrences.start_date) occurrence_date |
FROM MD9fC_tec_occurrences |
INNER JOIN MD9fC_tec_series_relationships as relationship ON relationship.event_post_id = MD9fC_tec_occurrences.post_id |
WHERE CAST(MD9fC_tec_occurrences.start_date AS DATETIME) > '2023-09-15 23:59:59' |
GROUP BY relationship.series_post_id |
) results_by_series ON results_by_series.series_post_id = MD9fC_tec_series_relationships.series_post_id AND results_by_series.occurrence_date = MD9fC_tec_occurrences.start_date |
UNION DISTINCT |
SELECT MD9fC_tec_occurrences.occurrence_id |
FROM MD9fC_tec_occurrences |
LEFT JOIN MD9fC_tec_series_relationships as relationship ON relationship.event_post_id = MD9fC_tec_occurrences.post_id |
WHERE CAST(MD9fC_tec_occurrences.start_date AS DATETIME) > '2023-09-15 23:59:59' |
AND relationship.event_post_id IS NULL |
) |
GROUP BY MD9fC_tec_occurrences.occurrence_id |
ORDER BY MD9fC_tec_occurrences.start_date ASC, MD9fC_posts.post_date ASC |
SELECT (MD9fC_tec_occurrences.occurrence_id + 10000000) as occurrence_id |
FROM MD9fC_posts |
JOIN MD9fC_tec_occurrences ON MD9fC_posts.ID = MD9fC_tec_occurrences.post_id |
WHERE 1=1 AND MD9fC_posts.post_type = 'tribe_events' AND ((MD9fC_posts.post_status = 'publish'))AND MD9fC_tec_occurrences.occurrence_id IN ( |
SELECT MD9fC_tec_occurrences.occurrence_id |
FROM MD9fC_tec_occurrences |
INNER JOIN MD9fC_tec_series_relationships ON MD9fC_tec_series_relationships.event_post_id = MD9fC_tec_occurrences.post_id |
INNER JOIN ( |
SELECT relationship.series_post_id, MAX(MD9fC_tec_occurrences.end_date) occurrence_date |
FROM MD9fC_tec_occurrences |
INNER JOIN MD9fC_tec_series_relationships as relationship ON relationship.event_post_id = MD9fC_tec_occurrences.post_id |
WHERE CAST(MD9fC_tec_occurrences.end_date AS DATETIME) < '2023-07-16 00:00:00' |
GROUP BY relationship.series_post_id |
) results_by_series ON results_by_series.series_post_id = MD9fC_tec_series_relationships.series_post_id AND results_by_series.occurrence_date = MD9fC_tec_occurrences.end_date |
UNION DISTINCT |
SELECT MD9fC_tec_occurrences.occurrence_id |
FROM MD9fC_tec_occurrences |
LEFT JOIN MD9fC_tec_series_relationships as relationship ON relationship.event_post_id = MD9fC_tec_occurrences.post_id |
WHERE CAST(MD9fC_tec_occurrences.end_date AS DATETIME) < '2023-07-16 00:00:00' |
AND relationship.event_post_id IS NULL |
) |
GROUP BY MD9fC_tec_occurrences.occurrence_id |
ORDER BY MD9fC_tec_occurrences.start_date DESC, MD9fC_tec_occurrences.duration DESC, MD9fC_posts.post_date DESC |
LIMIT 600, 151Hi @markbeese, @jerrystewart99
Since you have an active license and for us to help you better, please open a Support Ticket on our Help Desk. Also, for us to follow WordPress Forum Guidelines regarding premium users.??One of my colleagues will be with you shortly. We look forward to helping you out with this one.
Hang in there.
Best regards,
IrisHi @markbeese
It appears that there hasn’t been any recent activity on this thread, so we’ll consider it resolved. However, if you have any additional questions or concerns, please open a?Support Ticket?on our Help Desk.
This issue in not resolved! Please do not give anyone the impression that The Events Calendar has dealt with this. They have not.
They have redirected us to the internal support team where the issue is not resolved.
- This reply was modified 1 year, 4 months ago by markbeese.
- The topic ‘MySQL Query wp_tec_occurrences.occurrence_id + 10000000’ is closed to new replies.