percona-toolkit OPTIMIZE TABLE
1. MySQL查看剩余空间
select table_name, round(data_length/1024/1024) as data_length_mb, round(data_free/1024/1024) as data_free_mb from information_schema.tables where table_name in ( 'EMPLOYEE', 'DEPARTMENT', 'BENEFITS' );
用一个例子来演示会更加清晰