1CREATE TABLE t1( 2id INT UNSIGNED NOT NULL, 3dttm DATETIME NOT NULL, 4PRIMARY KEY(id, dttm) 5) ENGINE=InnoDB 6PARTITION BY RANGE COLUMNS(dttm) ( 7PARTITION pf_201612 VALUES LESS THAN ('20170101') ENGINE=InnoDB 8); 9SELECT * FROM t1 WHERE dttm > '2017-01-19' ORDER BY id DESC; 10id dttm 11SELECT * FROM t1 WHERE dttm > '2017-01-19' ORDER BY id ASC; 12id dttm 13DROP TABLE t1; 14