OPTIMIZE
Description
This statement is used to initiate a progressive major compaction.
The number of progressive major compactions is determined by the progressive_merge_num parameter of the table. If this parameter is not configured, the default value is used.
Syntax
OPTIMIZE {
TABLE table_list
};
table_list:
table_name [,table_name ...]
Parameters
| Parameter | Description |
|---|---|
| table_name | The name of the table to perform progressive major compaction on. |
Examples
Perform progressive major compaction on the t1 table.
OPTIMIZE TABLE t1;
Query OK, 0 rows affected (0.001 sec)