Home › Forums › Ticket Products › Event Tickets Plus › Events calendar with tickets very slow and some problems with sql
- This topic has 7 replies, 2 voices, and was last updated 6 years, 1 month ago by Ilkka.
-
AuthorPosts
-
February 9, 2018 at 12:04 am #1448615IlkkaParticipant
Hi There,
My test users are reporting that my calendar is way too slow. Of course i know myself too but anyways. I have been investigating it and found out the following problems in the sql queries. The problems described below my text. The calendar plugin and tickets plugin are also creating 372 duplicate queries in the calendar view i do not know is it possible to avoid these duplicate queries.
So my question is that what can i do for making the calendar and its views faster. I am using month view with two events displayed, which is under the default.
Thanks…
I analyzed the page and got the following results
This is analysed as slow query according sql analysis:
SELECT tribe_event_start.post_id as ID, tribe_event_start.meta_value as EventStartDate, tribe_event_end_date.meta_value as EventEndDate
FROM wp_postmeta AS tribe_event_start
LEFT JOIN wp_posts
ON tribe_event_start.post_id = wp_posts.ID
LEFT JOIN wp_postmeta as tribe_event_end_date
ON ( tribe_event_start.post_id = tribe_event_end_date.post_id
AND tribe_event_end_date.meta_key = ‘_EventEndDate’ )
WHERE wp_posts.ID NOT IN ( 2253,2252,2290,2285,2294,2291,2302,2824,2831,2825,2832,2839,2833,2846,2840,2847,2854,2848,2861,2855,2870,5260 )
AND tribe_event_start.meta_key = ‘_EventStartDate’
AND ( ( tribe_event_start.meta_value >= ‘2018-05-28 00:00:00’
AND tribe_event_start.meta_value = ‘2018-05-28 00:00:00’
AND tribe_event_end_date.meta_value <= '2018-07-01 23:59:59' )
OR ( tribe_event_start.meta_value ‘2018-07-01 23:59:59’ ) )
AND wp_posts.post_status IN(‘publish’,’private’)
ORDER BY wp_posts.menu_order ASC, DATE(tribe_event_start.meta_value) ASC, TIME(tribe_event_start.meta_value) ASC;
This query has some errors on it:
Unknown column ‘wp_postmeta.meta_value’ in ‘field list’SELECT 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_term_relationships
ON (wp_posts.ID = wp_term_relationships.object_id)
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 = ‘_EventEndDateUTC’ )
WHERE 1=1
AND ( wp_term_relationships.term_taxonomy_id IN (79) )
AND wp_posts.post_type = ‘tribe_events’
AND (wp_posts.post_status = ‘publish’
OR wp_posts.post_status = ‘tribe-ea-success’
OR wp_posts.post_status = ‘tribe-ea-failed’
OR wp_posts.post_status = ‘tribe-ea-schedule’
OR wp_posts.post_status = ‘tribe-ea-pending’
OR wp_posts.post_status = ‘tribe-ea-draft’
OR wp_posts.post_status = ‘private’)
AND (wp_postmeta.meta_value >= ‘2018-05-31 23:00:00’
OR (wp_postmeta.meta_value = ‘2018-05-31 23:00:00’ ))
GROUP BY wp_posts.ID
ORDER BY EventStartDate DESC, wp_posts.post_date DESC
LIMIT 0, 1February 12, 2018 at 11:46 am #1450958Jaime MarchwinskiKeymasterHi Ilkka,
Thanks so much for reaching out again!
I’m sorry to hear that your site is running slowly with use of our plugins.
As a first step, please have a look at our Performance Considerations and see if there is anything you can adjust in order to help your site run better:
https://theeventscalendar.com/knowledgebase/performance-considerations/
After that, you may be interested in caching, so take a look at this article: https://theeventscalendar.com/knowledgebase/caching-basics/
In addition, you can check out some of the solutions provided in this forum post:
https://theeventscalendar.com/support/forums/topic/decreasing-loading-time-for-big-amount-of-events/
I would also recommend looking into some of the plugins in this blog post, as they may be able to help you pinpoint where site slowness may be occurring:
https://theeventscalendar.com/favorite-developer-plugins/
Let me know how it goes and if you need any further assistance on this topic!
Thanks,
Jaime
February 18, 2018 at 1:21 am #1456748IlkkaParticipantHi, I will investigate these options. Any comments on the sql notifications?
thanks
February 19, 2018 at 5:17 am #1457413Jaime MarchwinskiKeymasterHi Ilkka,
Before I can give some more specific advice, could you please provide us with your complete system information in a private reply using the instructions found in the following link?
https://theeventscalendar.com/knowledgebase/sharing-sys-info/
Let me know if anything else comes up in the meantime!
Thanks,
Jaime
February 20, 2018 at 3:15 am #1458425IlkkaParticipantThis reply is private.
February 20, 2018 at 5:05 am #1458487Jaime MarchwinskiKeymasterHi Ilkka,
Thanks for providing me with that information.
In addition to the suggestions I provided in my previous response, you can also try removing the attendee column, which indicates the percentage of tickets sold:
add_filter( 'tribe_tickets_supported_admin_columns', '__return_empty_array' );
Let me know if that helps and how it all goes!
Thanks,Jaime
March 14, 2018 at 9:35 am #1479090Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Events calendar with tickets very slow and some problems with sql’ is closed to new replies.