Home › Forums › Calendar Products › Events Calendar PRO › query performance issues on update_meta with new meta chunker
- This topic has 26 replies, 4 voices, and was last updated 6 years, 9 months ago by Nicolas.
-
AuthorPosts
-
June 13, 2017 at 12:43 am #1297064NicolasParticipant
Hello, One minute to publish a post or an event. Could you tell me how to comment meta chunked please ?
========================
PLEASE LEAVE FOR SUPPORT
Reporting the same issue as: https://theeventscalendar.com/support/forums/topic/severe-query-performance-issues-with-new-meta-chunker/June 14, 2017 at 9:06 pm #1298248VictorKeymasterHi Nicolas!
Thanks for reaching out to us!
Is the code snippet that Zach put up here the one you are looking for?
Are you experiencing delays when publishing a post or an event? Did this started all of a sudden after an update for example?
How many events, venues and organizers do you currently have in your site? Perhaps you can tell me more about your issue and see if we can find the source of it.
Let us know how that goes.
Best,
VictorJune 14, 2017 at 11:48 pm #1298307NicolasParticipantDear Victor,
Thank you for your kind availability.
We use this snippet since yesterday. It perfectly resolved the issue but only with regular post and not custom ones.
The issue appeared when you introduced a new class named meta_chunker.
Actually, to publish an event (and before this snippet a regular post as well) is activating 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 causes a very long query witch hits the DB (a bunch of hundreds of ID is included inside). This burns a large amount of memory and slow down the database.
So, is there a way to bypass chunker waiting next release ? For instance :
function tribe_remove_post_from_chunker( $post_types ) {
return array_diff( $post_types, array( ‘post’, ‘tribe_events’, ‘tribe_categorie’, ‘tribe_venue’, tribe_meta’ ) );
}
add_filter( ‘tribe_meta_chunker_post_types’, ‘tribe_remove_post_from_chunker’ );Thank you for your urgent and appreciate help.
Best regards,
Nicolas
June 15, 2017 at 3:17 am #1298374NicolasParticipantThis reply is private.
June 15, 2017 at 7:32 am #1298451VictorKeymasterThis reply is private.
June 25, 2017 at 12:54 pm #1304059NicolasParticipantGood evening,
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 postsCould you help me shiftly please to prevent venues’ update thanks to a snippet please ?
Best,
Nicolas
June 26, 2017 at 7:19 am #1306237NicoMemberHi there Nicolas,
While Victor will continue to help you here, I just wanted to inform that we included a fix for the ‘meta chunker issue’ in our release shipped last week (release notes).
Please let us know if you still experience issue after updating the plugins,
Best,
NicoJune 26, 2017 at 7:28 am #1306262NicolasParticipantYes, unfortunatly, The last release did not fix the huge amount of venue’ id which is called by each publish of event posts or regular ones. The situation is dramatic
June 26, 2017 at 8:46 am #1306477NicolasParticipantGood 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 postsCould you help me shiftly urgently please to prevent venues’ update thanks to a snippet please ?
The situation is dramatic,
Best,
Nicolas
June 26, 2017 at 10:34 pm #1308239VictorKeymasterHi Nicholas!
Thanks for coming back with all that info regarding this issue. I’m really sorry you are experiencing that.
After making some tests on my end I could spot the query you are referring to, although I don’t experience the slow down in performace, but this might be related to the number of events/venues.
I have logged a new report regarding this issue and the team will investigate it further. We will also try to come up for a workaround to prevent that query from loading, so we’ll keep you posted as soon as we have something.
In the meantime, could you please let us know the amount of events and venues you currently have in your site?
Thanks,
VictorJune 27, 2017 at 12:50 am #1308307NicolasParticipantThis reply is private.
June 27, 2017 at 5:36 pm #1309771VictorKeymasterThis reply is private.
June 28, 2017 at 1:56 am #1309969NicolasParticipantThis reply is private.
June 28, 2017 at 8:20 pm #1311037GeorgeParticipantThis reply is private.
June 28, 2017 at 9:59 pm #1311167NicolasParticipantDear Georges,
Thanks for you’re the kind and reliable availability of your team !
1. Here, the database link : /* edited by admin for security purposes
2. Could you remove the last line on github please (/* edited by admin for security purposes) please ?
I very hope your inquiry would fulfill soon,
I wish you a good day,
De vous lire,
Bien cordialement,
/* edited by admin for security purposes
-
AuthorPosts
- The topic ‘query performance issues on update_meta with new meta chunker’ is closed to new replies.