Some maintenance tasks for mysql 5.6 partition maintenance tables and partitions are applicable to the use of SQL statements on mysql partition tables. To maintain a partition TABLE, you can use statements that support partition tables: check table, optimize table, analyze table, and repair table you can use some extension of alter table to execute one or more partitions of this type. 1. Re-partition: This is the same as deleting all records saved in the partition and then re-inserting them. It can be used to organize partition fragments. For example, alter table t1 rebuild partition p0, p1; 2. optimized partition: if a large number of rows are deleted from the partition, or a row with a variable length (that is, a VARCHAR, BLOB, or TEXT column) is modified a lot, you can use "alter table... optimize partition "to reclaim unused space and sort the shards of PARTITION data files. For example: alter table t1 optimize partition p0, p1; using "optimize partition" on a given partition table is equivalent to running check partition, analyze partition, and repair partition on that PARTITION. 3. Analyze partitions: Read and save the partition key distribution. For example, alter table t1 analyze partition p3; 4. Repair partitions: repair damaged partitions. For example, alter table t1 repair partition p0, p1; 5. CHECK partitions: CHECK partitions in almost the same way as CHECK tables for non-PARTITION tables. For example, alter table trb3 check partition p1. This Command tells you whether the data or index in PARTITION p1 of TABLE t1 has been damaged. If this happens, use "alter table... repair partition" to fix the PARTITION. Each statement in the list also supports replacing the partition name in the list with the keyword "ALL. For example, alter table trb3 check partition all; using mysqlcheck and myisamchk does not support PARTITION tables. In mysql 5.6, you can use alter table... truncate partition to TRUNCATE partitions. This statement can be used to delete all rows in one or more partitions. It is similar to the operation of truncate table to delete all rows from the TABLE. Alter table... truncate partition all truncates ALL partitions in the TABLE.