一、删除分区
##查看要处理的分区的数据量,并导出作为备份
mysql> select count(*) from baby_account_change_log where updated_time >'2016-12-01 00:00:00' and updated_time
+----------+
| count(*) |
+----------+
| 66252 |
+----------+
1 row in set (0.23 sec)
##导出备份
mysql> select * into outfile '/tmp/baby_account_change_log_p1.sql' from baby_account_change_log where updated_time >'2016-12-01 00:00:00' and updated_time
Query OK, 66252 rows affected (2.71 sec)
##确认要处理分区
mysql> explain partitions select count(*) from baby_account_change_log where updated_time >'2016-12-01 00:00:00' and updated_time
+----+-------------+-------------------------------+------------+-------+---------------+---------+---------+------+-------+-----------