LONG QUERY DUE TO UPDATE_META_CACHE

Home Forums Calendar Products Events Calendar PRO LONG QUERY DUE TO UPDATE_META_CACHE

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1289758
    Nicolas
    Participant

    Hello,

    We face a dramatic issue : all posts published (events and regular post as well) activate wp-include/meta :
    // Get meta info
    $id_list = join(‘,’, $ids);
    $cache = array();
    $meta_list = $wpdb->get_results( $wpdb->prepare(“SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list)”,
    $meta_type), ARRAY_A );

    This update of the cache causes very long queries (a list of hundreds of ID is included inside). This uses a large consumption of memory and slow down the database.

    Could you tell me how to stop running this please ?

    Regards,

    Nicolas

    #1291462
    Shelby
    Participant

    Hi there Nicolas,

    I’m happy to help! 🙂

    This is actually an issue that is related to a bug that is one of our top priorities, and we’re in the process of taking care of, and should be resolved in the next maintenance release. I’ll associate your thread with the bug ticket so that you can be notified when this is resolved.

    If you have any follow up questions or need any clarification on this, please let me know!

    Best,

    Shelby 🙂

    #1291477
    Nicolas
    Participant

    Dear Shelby,

    Should The Events Calendar 4.6.0 Release Candidate 2 be able to fix this problem ?

    Best Regards,

    Nicolas

    #1292624
    Nicolas
    Participant

    The last release did not fix anything…

    #1292956
    Nicolas
    Participant

    Please Shelby, I need an answer : should it work if I revert to 4.4 or even 4.3 versions ?

    #1294245
    Nicolas
    Participant

    The last release did not fix the issue : it takes about one minute to publish a single event. Please, could you provide me an help ?

    #1296570
    Nicolas
    Participant

    This reply is private.

    #1300287
    Barry
    Member

    Hi Nicolas,

    I apologize first of all for the long delay in responding.

    As Shelby noted we do have a fix in the works that relates to a piece of code which works with post meta data and, inadvertently, runs at times when it shouldn’t.

    A new release is on its way which should address this and I would recommend we wait and see if that helps in your case specifically; in the meantime you could certainly consider downgrading and doing so should not break your site so long you also downgrade other plugins accordingly.

    For instance, if you roll back to The Events Calendar 4.4.5 then I’d recommend you also roll back these other plugins which you appear to be using:

    • Community Events → 4.4.3
    • Events Calendar PRO → 4.4.5
    • Eventbrite Tickets → 4.4.1

    If you are still using Facebook Events, simply keep it on the same version.

    #1300354
    Nicolas
    Participant

    Dear Barry,

    I thank you for your detailed answer.

    Could I dare asking you if the next release should take place this week ?

    Best regards,

    Nicolas

    #1301984
    Nicolas
    Participant

    This reply is private.

    #1301986
    Nicolas
    Participant

    All the problem comes from venue posts…

    #1301989
    Nicolas
    Participant

    All the id refere to VENUE POST
    wp-includes/class-wp-query.php:2856
    + Plugin: the-events-calendar 8224 0,0883
    SELECT post_id, meta_key, meta_value
    FROM wp_postmeta
    WHERE post_id IN only venue posts

    Could you give me a snippet in order to stop update_meta_cache() with venue posts ?

    Thank you,

    Best regards,

    Nicolas

    #1302019
    Nicolas
    Participant

    ok : I understand the issue : when a post is updated, ALL THE VENUE POST are update_meta_cache !

    Two solutions :
    1. Trash all venue posts (sniff…)
    2. Prevent publish or save to update venue posts

    Could you help me please ?

    #1306632
    Nicolas
    Participant

    Good evening,

    Even after the last release, when a single event is published or updated, ALL THE VENUE POSTS stored in post_meta DB are update_meta_cached !

    // Get meta info
    $id_list = join(‘,’, $ids);
    $cache = array();
    $meta_list = $wpdb->get_results( $wpdb->prepare(“SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list)”,
    $meta_type), ARRAY_A );
    $id_list = ALL VENUE IDs are included !!!

    Result –> LONG AND SLOW QUERY

    Two solutions :
    1. Trash all venue posts (sniff…)
    2. Prevent publish or save to update venue posts

    Could you help me shiftly urgently please to prevent venues’ update thanks to a snippet please ?

    The situation is dramatic,

    Best,

    Nicolas

    #1340553
    Victor
    Keymaster

    Hi Nicolas!

    Just doing a pass to cleanup old threads that are still open and found out that this is a duplicate of this one https://theeventscalendar.com/support/forums/topic/query-performance-issues-on-update_meta-with-new-meta-chunker/

    I also wanted to note that the meta chunker issue linked to this thread was already resolved in a previous version of our plugins and should not be a problem anymore.

    I’ll go ahead and close this now, but feel free to open a new topic if anything comes up and we’d be happy to assist.

    Cheers,
    Victor

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘LONG QUERY DUE TO UPDATE_META_CACHE’ is closed to new replies.