3 ms·
When you say that you keep this temporary data around for 3-6 months, do you have a requirement that it be kept in the database for 3-6 months or can you keep b
by bartonfink 16y ago
When you say that you keep this temporary data around for 3-6 months, do you have a requirement that it be kept in the database for 3-6 months or can you keep backups and fill requests for old data from them? That can reduce the size of your tables so your cleaner has less data to process.
If you know that certain tables are subject to this record-keeping requirement, why not add a created_timestamp field to each table you need to keep around? That way, your "cleaner" logic is as simple as "delete * from table where created_timestamp before (six months ago)" with the database-specific date functions and appropriate table name.