MySQL multi-column partitioning a table created for an instance of MySQL5.5 COLUMNS partition: Java code drop TABLE if exists partition_test; CREATE table 'partition _ test' ('t _ id' int (11) not null AUTO_INCREMENT, 'test _ date' datetime not null, 't_key' varchar (16), 'test _ info' varchar (50) DEFAULT 'test ', primary key ('t_id', 'test _ date', 't_ key') ENGINE = InnoDB default charset = utf8 partition by range columns (test_date, t_key) (PARTITION p201303151 values less than ('2017-03-15 ', 'm2'), PARTITION p201303152 values less than ('2017-03-15 ', 'm3 '), PARTITION p201301_1 values less than ('1970-03-16 ', 'm2'), PARTITION p201301_2 values less than ('1970-03-16 ', 'm3 '), PARTITION p201303171 values less than ('2017-03-17 ', 'm2'), PARTITION p201303172 values less than ('2017-03-17 ', 'm3'); pay attention to two points: 1. 5.5 After COLUMNS partition is added, the time conversion function is no longer required; 2. The partition field must add a table PARTITION for the primary key. Java code alter table 'partition _ test' add PARTITION (partition p201303181 values less than ('2017-03-18 ', 'm2 ')); delete A table partition (deleting a PARTITION will delete the data in the partition) Java code alter table 'partition _ test' drop partition p201303181;