首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

mysql 清算碎片

2012-08-26 
mysql 清理碎片显示你数据库中存在碎片的全部列表:select table_schema, table_name, data_free, enginefr

mysql 清理碎片
显示你数据库中存在碎片的全部列表:
  select table_schema, table_name, data_free, engine
   from information_schema.tables
    where table_schema not in ('information_schema', 'mysql') and data_free > 0;

如果你发现一些列表中包含了大量的数据留空现象,那么对其进行优化是绝对值得的,因为这一过程会大大提升列表的读取性能及应用表现。
  optimize table tableName;

热点排行