我有一个MySQL表(包含大数据):
CREATE TABLE `rider_orders` ( `id` NOT NULL AUTO_INCREMENT PRIMARY KEY, `date` date NOT NULL, `shift_id` INT NOT NULL, `rider_id` INT NOT NULL, `product_id` INT NOT NULL )
我想按月(通过更改)添加分区:
ALTER TABLE rider_orders PARTITION BY HASH(MONTH(date));