Caveat of Partitioning with Timestamp on Mysql

On a project I am working on, I have a fair amount of data to be processed. I wanted to load the data into a huge table so I can analyze the data quality better. While the data set is not Petabytes in size, it is not small either. And as I needed some index on the table, and to alleviate the growth of average insertion speed which is of \(O(n log(n))\), partitioning comes in mind.

I think the most road traveled is to use TO_DAYS(date) on a Datetime field. However, if for whatever reason, you wanted to use timestamp instead of datetime, one need to be careful how the timestamp field is declared, otherwise it will be defaulted to use CURRENT_TIMESTAMP on insertion and update. I had to default it to NULL to override the default timestamp behaviour(and hence have a unfortunately side effect of allowing nulls).

Below is an example.