how to partition a table by datetime column?
问题 I want to partition a mysql table by datetime column. One day a partition.The create table scripts is like this: CREATE TABLE raw_log_2011_4 ( id bigint(20) NOT NULL AUTO_INCREMENT, logid char(16) NOT NULL, tid char(16) NOT NULL, reporterip char(46) DEFAULT NULL, ftime datetime DEFAULT NULL, KEY id (id) ) ENGINE=InnoDB AUTO_INCREMENT=286802795 DEFAULT CHARSET=utf8 PARTITION BY hash (day(ftime)) partitions 31; But when I select data of some day.It could not locate the partition.The select