I've got a database which is getting quite large and slow to query. I only really need the last month of entries for most situations so I'm looking to create structure-copies of two of my tables and then regularly move data from the 'live' two into the 'archive' two if the records are more than a month old.
What is the best way to achieve this? Should I regularly perform checks from my application (C#) or would it be better to let MySQL handle this operation?
benkyma
-1
Light Poster
Recommended Answers
Jump to PostYou can set a cron to run on every first day of the month, which will copy the record from main table to archive table[and delete entries in the main table].
We do it the same way in our company, but the data is archived on yearly basis. I also …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.