title: mysql partition by range performance on a date column
body: <p>Need advise on partitioning my database tables. The table has 12M rows.</p>
  
  <p>I currently built the following partitions. Resulted in great performance increase on my queries.</p>
  
  <pre><code>ALTER TABLE sales_data_mkt
  PARTITION BY RANGE ( TO_DAYS(`ACTIVITY_DT`) ) (
      PARTITION p0 VALUES LESS THAN ( TO_DAYS('2015-01-01') ),
      PARTITION p1 VALUES LESS THAN ( TO_DAYS('2015-02-01') ),
      PARTITION p2 VALUES LESS THAN ( TO_DAYS('2015-03-01') ),
      PARTITION p3 VALUES LESS THAN ( TO_DAYS('2015-04-01') ),
      PARTITION p4 VALUES LESS THAN ( TO_DAYS('2015-05-01') ),
      PARTITION p5 VALUES LESS THAN (MAXVALUE)
  );
  </code></pre>
  
  <p>After doing all this i saw that you can also partition without the <code>To_DAYS()</code> method using <code>Partition by Range columns</code></p>
  
  <pre><code>ALTER TABLE sales_data_mkt
  PARTITION BY RANGE columns (`ACTIVITY_DT`) (
      PARTITION p0 VALUES LESS THAN ('2015-01-01'),
      PARTITION p1 VALUES LESS THAN ('2015-02-01'),
      PARTITION p2 VALUES LESS THAN ('2015-03-01'),
      PARTITION p3 VALUES LESS THAN ('2015-04-01'),
      PARTITION p4 VALUES LESS THAN ('2015-05-01'),
      PARTITION p5 VALUES LESS THAN (MAXVALUE)
  );
  </code></pre>
  
  <p>What are the pro/cons for the new <code>range columns</code> way of partitioning. Is it faster?</p>