Slow Queries

Home Forums Ticket Products Event Tickets Plus Slow Queries

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1341679
    Sam Barnes
    Participant

    Hello,

    I’m having slowness issues with the Event Tickets Plus plugin.

    Quite a few queries run by the plugin are very slow. e.g.

    SELECT comment_approved, COUNT( * ) AS num_comments
    FROM wp_comments
    WHERE comment_type != “tribe-ea-error”
    GROUP BY comment_approved

    Called by Tribe__Events__Aggregator__Errors->remove_error_comments_from_wp_counts running on the WP dashboard is taking over 2 seconds to run.

    Also, the following query is run 4 times on each event page on the front end and is taking over 4 seconds for each:

    SELECT items.order_id
    FROM wp_woocommerce_order_itemmeta AS meta
    INNER JOIN wp_woocommerce_order_items AS items
    ON meta.order_item_id = items.order_item_id
    INNER JOIN wp_posts AS posts
    ON items.order_id = posts.ID
    WHERE (meta_key = ‘_product_id’
    AND meta_value = 138255
    AND posts.post_status IN (“wc-on-hold”,”wc-pending”,”wc-processing”) );

    If i deactivate the event tickets plus plugin all goes back to normal.

    Any ideas?

    Also, I’m running the tests on a development server https://plesk.spoiltrottenbeads.co.uk/

    Thanks,

    Sam

    #1341686
    Sam Barnes
    Participant

    The second query is run by Tribe__Tickets_Plus__Commerce__WooCommerce__Main->get_orders_by_status

    #1342045
    Andras
    Keymaster

    Hello Sam,

    Thanks for reaching out and reporting those.

    I would like to ask for some more information so we can better investigate these issues.

    Called by Tribe__Events__Aggregator__Errors->remove_error_comments_from_wp_counts running on the WP dashboard is taking over 2 seconds to run.

    Does this happen on every page / pageload? Or only on specific pages? Which ones?

    Does this one also disappear when you deactivate Event Tickets Plus?

    Also, the following query is run 4 times on each event page on the front end and is taking over 4 seconds for each:

    Does this run also on month view, list view etc. or only on the single event pages?

    Is this part the same or different for the different products:

    WHERE (meta_key = '_product_id'
    AND meta_value = 138255

    Thanks for clarifying these for me.

    Cheers,
    Andras

     

    #1342229
    Sam Barnes
    Participant

    Hi Andra,

    Thanks for getting back to me.

    The first one only seams to run on the main wp-admin dashboard for every page load and does not go when you disable event tickets plus.

    I have also noticed that when events ticket plus is activated I can’t even view the events admin page: https://plesk.spoiltrottenbeads.co.uk/wp-admin/edit.php?post_type=tribe_events

    It just times out.

    As far as I can tell the second one is running on the list and month views but these pages are just timing out so I cant know for sure.

    And the part is the same for each product apart from the meta_value which is equal to each product id.

    Would it help to provide you with admin access so you can see the issues?

    I have query monitor installed so you can view the slow queries.

    #1342235
    Sam Barnes
    Participant

    Due to the size of the table and number of orders on this site it looks like the main issue is queries to the wp_woocommerce_order_itemmeta in order to determine how many of each ticket has been sold.

    Could this not be done using:

    $count = get_post_meta($product_id,’total_sales’, true);

    ?

    Thanks.

    #1342695
    Andras
    Keymaster

    Hey Sam,

    Thanks for clarifying my questions, that was great help!

    And I appreciate the offer! Our current policy is not to accept logins or to log in to customer servers / WordPress installations.

    I have checked on my local installation with only the calendar and ticket plugins, WooCommerce, and Query Monitor and so far I haven’t been able to reproduce the issue.

    Could you do a similar test or better, go through our conflict testing guide and see if that changes anything? Might be there is another plugin at play here as well.

    Thanks,
    Andras

    #1352745
    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 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Slow Queries’ is closed to new replies.