On Fri, Oct 3, 2014 at 2:28 AM, Gilles Dubuc <gilles@wikimedia.org> wrote:We can trim down our team (multimedia)'s tables considerably by getting rid of data older than 30 days. This could even be done by a daily cron. How would we go about doing that? Should we be the ones taking care of it? I'm not sure that the DB credentials I currently have can delete content.We can automate purging using the MariaDB using the Event Scheduler[1] if you guys want a once-off-set-and-forget solution. Eg:Then for each EL table you would do:
CREATE TABLE purge_schedule (
table_name varchar(100) NOT NULL,
days tinyint(3) unsigned NOT NULL
);
INSERT INTO purge_schedule VALUES ('MultimediaTiming_7193302', 30);The rest would be left to me, or rather, to a couple of stored procedures :-)[1] Basically a cron that runs stored procedures: https://mariadb.com/kb/en/mariadb/documentation/stored-programs-and-views/stored-programs-and-views-events/events/
_______________________________________________
Analytics mailing list
Analytics@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/analytics