Home › Forums › Calendar Products › Events Calendar PRO › Long running Query
- This topic has 5 replies, 2 voices, and was last updated 11 years, 2 months ago by
Barry.
-
AuthorPosts
-
January 22, 2015 at 2:36 pm #936403
karen
ParticipantIs there anything you can tell me about this query. it appears to be a long running one slowing down the system perhaps. I recently had a database slowdown, and I am trying to figure out the culprit.
thanksCount: 1 Time=13.07s (13s) Lock=0.00s (0s) Rows=0.0 (0), database[username]@localhost
SELECT DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, tribe_event_end_date.meta_value as EventEndDate FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_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 = ‘S’ ) WHERE N=N AND wp_posts.post_type = ‘S’ AND (wp_posts.post_status = ‘S’) AND (
wp_postmeta.meta_key = ‘S’
) AND ((wp_postmeta.meta_value >= ‘S’ AND wp_postmeta.meta_value <= ‘S’) OR (tribe_event_end_date.meta_value >= ‘S’ AND wp_postmeta.meta_value <= ‘S’ ) OR (wp_postmeta.meta_value < ‘S’ AND tribe_event_end_date.meta_value >= ‘S’ )) GROUP BY wp_posts.ID ORDER BY DATE(MIN(wp_postmeta.meta_value)) ASC, TIME(wp_postmeta.meta_value) ASCJanuary 23, 2015 at 6:33 am #936698Barry
MemberHi Karen,
I’m sorry you’re experiencing difficulties and I’d love to build up a better picture of the problem:
- Can you provide any insights as to when that particular slow-running query is taking place – and does the same query consistently take so long to run or is this more of a worst case scenario?
- I took a look at the URL you provided when you opened this topic and my impression is you have close on 3,500 events (past and future), a very high proportion of which are recurring – does that sound fairly accurate?
- I wonder too if you an share any information about the level of traffic you are dealing with and what sort of server/hosting package you are currently using.
Thanks!
January 23, 2015 at 2:31 pm #936904karen
ParticipantThis reply is private.
January 23, 2015 at 6:34 pm #936968Barry
MemberThis reply is private.
January 23, 2015 at 6:38 pm #936969Barry
MemberThat does help: I’m surprised you’re experiencing slow downs given what you’ve noted and if you can glean anything further once you have additional access that would be great – I’m keen to see if we can determine which view/user action in particular is triggering the slowdown.
Thanks again and have a great weekend, too 🙂
February 9, 2015 at 6:27 am #940899Barry
MemberHi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!
-
AuthorPosts
- The topic ‘Long running Query’ is closed to new replies.
