My DB project includes several MYISAM tables with measurements collected online,
Each row entry contains an auto-incrementing id, some data, and an integer representing unixtime.
I am developing an aging mechanism, and I am interested in using MySQL partitioning to dynamically partition each such table based on unixtime.
Tell me, what interests me is that each section will represent one month of data, the last section should be 2 months if records are received for the next month not presented, the section that represents 2 months should be reorganized to represent one month, and the new section should be created by representing 2 months (1 taken from the last section and 1 for future measurements)
Also, when a new partition is created, I'm curious that the oldest partition will be deleted.
- What type of partition should I use (my unixtime is not a unique key and how can I use unixtime for splitting purposes)?
- How do I create partitioning completely dynamically based on new records added to tables?
UPDATE 12.12.12
I found an interesting link to a similar approach to what I described your-magical-range-partitioning-maintenance-query .
source share