Hi guys, I’ve been looking into slimming down the database for our install of EE as our site’s noticeably more sluggish than a fresh install of wordpress on the same server. Two tables that instantly stand out to me in our database are wp_esp_log and wp_esp_message both of which are hundreds of MB in size, which is a pain for backups alone, aside from any impact it may have on queries.
I’ve had a quick browse through EE’s source code in relation to the esp_log database but wasn’t able to establish it’s exact purpose or how integral it is to other pieces of data.
Basically I’m posting here to ask if it would be safe to remove old (over two months ago) rows from these two tables without damaging our site’s functionality. As far as I can tell a majority of the log rows are to do with payments, which have their own dedicated table, and the messages table seems to be storing every single HTML email send by EE as a string in a new row, which isn’t really something our company need to be keeping in the database longterm.
It’s totally fine to empty (just don’t delete) the esp_log table, or as your idea goes to remove the data from each of those tables that’s older than 2 months. 2 days would be fine too.
There’s actually a few open tickets to add an option to control how long to keep the messages activity data, and to add an automatic cleanup of payment log data to keep those tables to a reasonable size.
In 4.9.31.p, we added an option to control how long you retain the messages data:
– Forever (default, never delete)
– 3,6,9,12,24,36 month options
We will announce and discuss this more on the EventEspresso.com blog soon.
Viewing 2 reply threads
The support post ‘Slimming down database’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.