创建表的时候,可不可以创建分区表,比如类似下面的sql
CREATE TABLE `test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ds` int(11) ,
PRIMARY KEY (`id`,`ds`) ,
UNIQUE INDEX `m_index` (`xx`, `xx`, `xx`, `xx`, `ds`) USING BTREE
)ENGINE=MyISAM PARTITION BY List(`ds`) (
PARTITION p_20170101 VALUES in (20170101),
PARTITION p_20170102 VALUES in (20170102),
PARTITION p_20170103 VALUES in (20170103),
PARTITION p_20170104 VALUES in (20170104),
PARTITION p_20170105 VALUES in (20170105),
PARTITION p_20170106 VALUES in (20170106),
PARTITION p_20170107 VALUES in (20170107),
PARTITION p_20170108 VALUES in (20170108),
PARTITION p_20170109 VALUES in (20170109),
PARTITION p_20170110 VALUES in (20170110),
PARTITION p_20170111 VALUES in (20170111),
PARTITION p_20170112 VALUES in (20170112),
PARTITION p_20170113 VALUES in (20170113),
PARTITION p_20170114 VALUES in (20170114),
PARTITION p_20170115 VALUES in (20170115),
PARTITION p_20170116 VALUES in (20170116),
PARTITION p_20170117 VALUES in (20170117),
PARTITION p_20170118 VALUES in (20170118),
PARTITION p_20170119 VALUES in (20170119),
PARTITION p_20170120 VALUES in (20170120),
PARTITION p_20170121 VALUES in (20170121),
PARTITION p_20170122 VALUES in (20170122),
PARTITION p_20170123 VALUES in (20170123),
PARTITION p_20170124 VALUES in (20170124),
PARTITION p_20170125 VALUES in (20170125),
PARTITION p_20170126 VALUES in (20170126),
PARTITION p_20170127 VALUES in (20170127),
PARTITION p_20170128 VALUES in (20170128),
PARTITION p_20170129 VALUES in (20170129),
PARTITION p_20170130 VALUES in (20170130),
PARTITION p_20170131 VALUES in (20170131)
)
;