I need a little help with a system I am setting up. This is one of the largest systems I have setup and I want some advice on the data model.
In my MySQL database I have 4 tables that I will be using. There will be approximately 150 records added to two of the tables each day, and approximately 1500 records added to the other two tables. So as you can see; these tables are going to grow fast.
The 150 records/day tables – approximately 50 different fields
The 1500 records/day tables – approximately 140 different fields
What I am concerned about is performance when people are trying to access the data. 90% of the queries will be for data that is 1 month old and newer, but they want the option to search data that is as old as 2-3 years old.
My plan is to run a cron job every night and any records older than 1 month will be moved into this separate ‘archive’ database. This ‘archive’ database will mirror the ‘live’ database as far as table fields. What I’m not sure is if I should create another database for the archive data. Or should I just create an archive table for each live table. Which of these would be the best approach? Any feedback would be greatly appreciated.