Our main table, tblLink
, will have its primary key as foreign in a few other tables too and one of the tables will be tblMainData
which over time will be millions of rows.
We would like to maintain only 3 months of data.
The rest we would like to purge and keep to generate history reports. What is the best mechanism to go about in this scenario?
Should we run a cron job to keep deleting data which is more than 3 months old? If so, how can we store it in a .sql
file?