Database Problems

Home Forums Calendar Products Events Calendar PRO Database Problems

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1268728

    Hi there,

    currently, we note very high database load for queries from the Events Calendar plugin. We have about 5000 events within 15000 posts.

    This query needs up to 25 seconds (!) for the first call, it’s fast for the second call as it’s in the query cache after 1st call.

    
    SELECT COUNT( DISTINCT( ID ) )
                            FROM   wp_posts
                            WHERE  wp_posts.post_type = 'tribe_events'
                            AND    wp_posts.post_status <> 'auto-draft'
                            AND    ID NOT IN (
                                       -- Find those posts that already have timezone meta data
                                       SELECT DISTINCT ( post_id )
                                       FROM   wp_postmeta
                                       WHERE  meta_key = '_EventTimezone'
                                   )
                            LIMIT 1;
    

    Can you please think over replacing subselects with joins? Subselects like this are very expensive concerning performance.

    Cheers Alex

    #1269813
    Barry
    Member

    Hi Alex,

    Thanks for contacting us! We can certainly consider that and I will log an issue for us to do so.

    Cheers 🙂

    #1279344
    Support Droid
    Keymaster

    Hey 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

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Database Problems’ is closed to new replies.