Reputation: 25
I have a table user_history
with 7 million records. I would like to know how to manage this table with the following criteria:
I have more than 2 million record of 2012 year, which are not widely used now, that means user only views his history sometimes.
Now what are the options to manage this table? Should I need to delete rows for year 2012? How do Social media sites (Facebook, Twitter) manage their user history?
Upvotes: 0
Views: 413
Reputation: 56432
One of the best way to handle large tables are to use partition.
It's like creating a lot a small tables, except Mysql does it for, for reading and writing, based on a column, which is the partition key.
More informations here : http://www.chrismoos.com/2010/01/31/mysql-partitioning-tables-with-millions-of-rows
Upvotes: 1