Mysql performance issues

Home Forums Calendar Products Events Calendar PRO Mysql performance issues

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1391987
    Shaw
    Participant

    I’m experiencing ongoing high CPU usage on my server from mysql. I’ve been reviewing slow queries log, and nearly all of the slow queries are coming from posts like below, with Query times 30+! The query looks to be a 3-table select.

    below is one of the queries from my log:

    How can this be fixed?

    [0] => # User@Host: irookcom_wrdp2[irookcom_wrdp2] @ localhost [] Id: 57627

    [1] => # Query_time: 33.846053 Lock_time: 0.000169 Rows_sent: 141 Rows_examined: 108549

    [2] => SET timestamp=1511580830;

    [3] => SELECT tribe_event_start.post_id as ID,

    [4] => tribe_event_start.meta_value as EventStartDate,

    [5] => tribe_event_end_date.meta_value as EventEndDate

    [6] => FROM wp_postmeta AS tribe_event_start

    [7] => LEFT JOIN wp_posts ON tribe_event_start.post_id = wp_posts.ID

    [8] => 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’ )

    [9] => WHERE tribe_event_start.meta_key = ‘_EventStartDate’

    [10] => AND (

    [11] => (

    [12] => tribe_event_start.meta_value >= ‘2017-10-29 02:00:00’

    [13] => AND tribe_event_start.meta_value <= ‘2017-12-03 01:59:59’

    [14] => )

    [15] => OR (

    [16] => tribe_event_end_date.meta_value >= ‘2017-10-29 02:00:00’

    [17] => AND tribe_event_end_date.meta_value <= ‘2017-12-03 01:59:59’

    [18] => )

    [19] => OR (

    [20] => tribe_event_start.meta_value < ‘2017-10-29 02:00:00’

    [21] => AND tribe_event_end_date.meta_value > ‘2017-12-03 01:59:59’

    [22] => )

    [23] => )

    [24] => AND wp_posts.post_status IN(‘publish’)

    [25] => ORDER BY wp_posts.menu_order ASC, DATE(tribe_event_start.meta_value) ASC, TIME(tribe_event_start.meta_value) ASC;

    #1393244
    Brendan
    Keymaster

    Hi Shaw,

    Thank you so much for being so thorough in your initial post and including the example troublesome query. We do have a few Knowledgebase articles geared towards performance which I’ll link to below. We are always looking for ways to optimize our coding methods, but ultimately, site performance is up to the site owner/manager.

    I can personally attest that speed/performance is one of (if not) the most challenging aspects to web development. From your server configuration, hosting provider, themes, plugins, external scripts, it never really ends! With that said, let me know if you have any follow-up questions or comments for me and best of luck getting your site running at a more optimum level.

    Caching: What, when and how
    The Events Calendar Performance Considerations
    Problems with Minification

    #1408855
    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 ‘Mysql performance issues’ is closed to new replies.