Jump to content

Clean out old data


Recommended Posts

Sorry if this has been answered elsewhere, but I wasn't able to find anything on it somehow. I just took over hosting a Revive ad server that has been in use since about 2012. It has been upgrade a few times over the years (currently on v5.2.1), but no one has been doing any maintenance and the database is currently over 3 GBs. Looking through the tables I am seeing a lot of stuff from 2015 or so. We don't need anything except the last 2 years. How or where do I set things to periodically purge older transactional data? Is there a setting somewhere that I missed to limit how long something is kept for? I found a forum post saying that people have been setting up custom scheduled scripts to clear out the old data, but that was from around 2014. Is that still the needed approach, and if so what tables are safe to delete old data from? 

Link to comment
Share on other sites

  • 3 months later...

manually deletion is not recommended, but i did that successfully on test installation.

do not forget to backup your data before.

TRUNCATE TABLE `ox_data_intermediate_ad`;
TRUNCATE TABLE `ox_data_intermediate_ad_connection`;
TRUNCATE TABLE `ox_data_summary_ad_hourly`;
TRUNCATE TABLE `ox_data_summary_zone_impression_history`; 

(table name prefix may be different e.g. rv_, check your config file, i assumed ox_ because of your old installation)

partial deletion should be possible the same way by the datetime columns of each table (with higher risk of inconsistent data).

Edited by qeepcologne
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...