我这里是按年份分区
ALTER TABLE snatchurl PARTITION BY RANGE(`range`)(
PARTITION p08 VALUES LESS THAN (2008),
PARTITION p09 VALUES LESS THAN (2009),
PARTITION p10 VALUES LESS THAN (2010),
PARTITION p11 VALUES LESS THAN (2011),
PARTITION p12 VALUES LESS THAN (2012),
PARTITION p13 VALUES LESS THAN (2013),
PARTITION p14 VALUES LESS THAN (2014),
PARTITION p15 VALUES LESS THAN (2015),
PARTITION p16 VALUES LESS THAN (2016),
PARTITION pmax VALUES LESS THAN MAXVALUE
);
注意:`range`字段需设为主键