I have got a simple game: players earn points, what I store in the POINTS table. I'm afraid the table will be too big, so I want to summarize the points of last month because optimalizing.
For example ID 42 player has got 120 records in the table between 01.08.2019 and 31.08.2019, with 560 points. I would like to delete the 120 rows, and insert only one, with 560 points. I am using PHP(5.6.40) and MySQL.
I have no idea how to solve it. Should I make an archive table, copy the records to it from original table, delete the copied records from original table, and insert back the summarized records only?
POINTS table
id : auto inc. int
timestamp : (unsigned) int
playerid : int
points : tinyint