Home › Forums › Calendar Products › Events Calendar PRO › "Featured Images" place an ever increasing burden on database size
- This topic has 7 replies, 2 voices, and was last updated 8 years, 1 month ago by
Mike.
-
AuthorPosts
-
February 25, 2018 at 6:19 pm #1463392
Mike
ParticipantOver time, each event added to a TEC Pro site that utilizes a featured image bloats the database to HUGE sizes. Even if the image is only loaded into uploads once and used over and over again, it saves a new copy for every event that uses that image into the DB. As an example, we’ve run over 12,000 events with TEC Pro, each with an attached feature image that has resulted in a database with about 1 GiB of images. This places an undue burden on the server, as it fills up the wp_postmeta table with a ton of sizable entries from expired events.
This is a very important issue for power users of TEC Pro, as database maintenance is of primary concern to any wordpress user with a large site.
For the short term, can Modern Tribe provide a SQL query that will delete all images saved in the database for expired events?
For the long term, I think this should be dealt with as a maintenance plugin for TEC Pro to remove expired events and all related data from a user’s site. Ideally, I see it providing the following:
Delete all expired events based off a user defined setting
1. All events, immediately upon expiration.
2. All events, at a user defined time period after expiration.
3. Events of selected categories, immediately upon expiration.
4. Events of selected categories, at a user defined time period after expiration.When deleting events, the plugin should also delete any related postmeta data, including featured images, reviews, etc.
While I don’t think this plugin would be necessary for most users who just run a few events a month, for power users who run HUNDREDS of events every month, this is a priority need to keep our database size under control.
Thanks for your time.
February 25, 2018 at 6:24 pm #1463393Mike
ParticipantHere is a starting point from a plugin perspective that delete’s ALL featured images. It would obviously need to be modified to only delete expired events.
I have not tested the above snippet at all.
-
This reply was modified 8 years, 2 months ago by
Mike.
February 27, 2018 at 4:01 am #1464634Mike
ParticipantI was able to take care of this myself. By removing the featured images from the database, I was able to shave 800 Megs off of the database size.
However, I would still like a SQL snippet from Modern Tribe to accomplish this for future maintenance cycles, as it was quite laborious to do so manually.
February 27, 2018 at 6:36 am #1464765Jaime Marchwinski
KeymasterHi Mike,
I’m glad you were able to get this figured out by yourself! Unfortunately, we don’t have a snippet available to achieve the same results.
Let me know if you have any other questions on this topic!
Thanks,
Jaime
February 27, 2018 at 3:37 pm #1465395Mike
ParticipantThis is still a critical need for any power user of TEC Pro, and manually culling the database of event specific featured images is a major hassle. For the community, I think there needs to be some sort of option for admins to accomplish this with relative ease.
February 28, 2018 at 4:41 am #1465781Jaime Marchwinski
KeymasterHi Mike,
Thank you for your feedback.
You can add this idea to our Feature Requests, as we tend to implement ideas based on customer feedback, so your input is greatly appreciated:
https://tribe.uservoice.com/forums/195723-feature-ideas
Let me know if you have any other questions!
Thanks,
Jaime
March 22, 2018 at 9:35 am #1486024Support Droid
KeymasterHey 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 -
This reply was modified 8 years, 2 months ago by
-
AuthorPosts
- The topic ‘"Featured Images" place an ever increasing burden on database size’ is closed to new replies.
