Mysqls clear fragmentation operation bitsCN.com
Mysqls fragment operation
Note:
Every time MySQL deletes a row of content from your list, this section is left empty. A large number of delete operations within a period of time will make this blank space more space than the storage list content. When MySQL scans data, the object it scans is actually the capacity limit of the list, that is, the part of the area where data is written in the peak position. If you perform a new insert operation, MySQL will try to use these blank areas, but it still cannot be completely occupied.
Mysql> select table_schema, table_name, data_free, engine from information_schema.tables where table_schema not in ('information _ scheme', 'mysql') and data_free> 0;
+ -------------- + ----------------------- + ----------- + -------- +
| Table_schema | table_name | data_free | engine |
+ -------------- + ----------------------- + ----------- + -------- +
| BK | comments | 9437184 | InnoDB |
| BK | historypwd | 9437184 | InnoDB |
| Ss | app_admin_log | 434 | MyISAM |
| Ss | app_article | 4434 | MyISAM |
| Ss | app_article_category | 43420 | MyISAM |
| Ss | app_config | 3324 | MyISAM |
| Ss | app_converter key | 1132 | MyISAM |
Data_free is The Shard space.
Clear fragments:
Optimize table ss. app_article; this method only supports the MyIsam engine
INNODB usage
Alter table table. name ENGINE = 'innodb'; backup is recommended before use
BitsCN.com