title: Dynamic MySQL partitioning based on UnixTime
body: <p>My DB design includes multiple MYISAM tables with measurements collected online,</p>
  
  <p>Each row record contains auto-incremented id, some data and an integer representing unixtime.</p>
  
  <p>I am designing an aging mechanism, and i am interested to use MySQL partitioning to partition each such table based on unixtime dynamically.</p>
  
  <p>Say that i am interested that each partition will represent single month of data, last partition should represent 2 months, if records arrive for the next not represented month, the partition that represented 2 months should be reorganized to represent single month, and new partition should be created representing 2 month (1 taken from the last partition and 1 for future measurements),</p>
  
  <p>Additionally, when a new partition is created i am interested that the oldest partition will be dropped.</p>
  
  <ol>
  <li>What type of partitioning i should use (my unixtime is not a unique key, and how would i use unixtime for partitioning purposes)?</li>
  <li>How would i design the partitioning to be fully dynamical based on new records added to the tables?</li>
  </ol>
  
  <p><strong>UPDATE 12.12.12</strong></p>
  
  <p>I have found and interesting link to similar approach to what i have described <a href="http://code.openark.org/blog/mysql/your-magical-range-partitioning-maintenance-query" rel="noreferrer">your-magical-range-partitioning-maintenance-query</a>.</p>