Home › Forums › Calendar Products › Events Calendar PRO › LONG QUERY DUE TO UPDATE_META_CACHE
- This topic has 15 replies, 4 voices, and was last updated 6 years, 8 months ago by Nicolas.
-
AuthorPosts
-
May 27, 2017 at 4:47 am #1289758NicolasParticipant
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
May 31, 2017 at 1:20 pm #1291462ShelbyParticipantHi 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 đ
May 31, 2017 at 2:20 pm #1291477NicolasParticipantDear Shelby,
Should The Events Calendar 4.6.0 Release Candidate 2 be able to fix this problem ?
Best Regards,
Nicolas
June 2, 2017 at 3:11 pm #1292624NicolasParticipantThe last release did not fix anythingâŚ
June 3, 2017 at 1:57 pm #1292956NicolasParticipantPlease Shelby, I need an answer : should it work if I revert to 4.4 or even 4.3 versions ?
June 6, 2017 at 11:20 pm #1294245NicolasParticipantThe last release did not fix the issue : it takes about one minute to publish a single event. Please, could you provide me an help ?
June 12, 2017 at 3:03 am #1296570NicolasParticipantThis reply is private.
June 19, 2017 at 8:10 pm #1300287BarryMemberHi 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.
June 20, 2017 at 1:07 am #1300354NicolasParticipantDear 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
June 22, 2017 at 3:08 pm #1301984NicolasParticipantThis reply is private.
June 22, 2017 at 3:13 pm #1301986NicolasParticipantAll the problem comes from venue postsâŚ
June 22, 2017 at 3:25 pm #1301989NicolasParticipantAll 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 postsCould you give me a snippet in order to stop update_meta_cache() with venue posts ?
Thank you,
Best regards,
Nicolas
June 22, 2017 at 4:18 pm #1302019NicolasParticipantok : 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 postsCould you help me please ?
June 26, 2017 at 9:40 am #1306632NicolasParticipantGood 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
August 25, 2017 at 3:48 pm #1340553VictorKeymasterHi 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 -
AuthorPosts
- The topic ‘LONG QUERY DUE TO UPDATE_META_CACHE’ is closed to new replies.