Long running Query

Home Forums Calendar Products Events Calendar PRO Long running Query

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #936403
    karen
    Participant

    Is 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.
    thanks

    Count: 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) ASC

    #936698
    Barry
    Member

    Hi 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!

    #936904
    karen
    Participant

    This reply is private.

    #936968
    Barry
    Member

    This reply is private.

    #936969
    Barry
    Member

    That 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 🙂

    #940899
    Barry
    Member

    Hi! 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!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Long running Query’ is closed to new replies.