转载至:http://beikeit.com/post-495.html 简单译文: 这段linux官方资料主要介绍了外部碎片(external fragmentation).内部碎片(internal fragmentation)的概念及相关情况,说明了linux文件系统在磁盘还有5%空闲空间的情况下是不需要碎片整理的.(Linux native file systems do not need defragmentation under normal use and this inclu
确认表的类型与存储引擎,是否全部是innodb select TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE,ENGINE,VERSION,ROW_FORMAT,TABLE_ROWS from information_schema.tables where lower(ENGINE)='innodb' and TABLE_SCHEMA not in ('mysql','information_schema','performance_schema'); #查看库中碎片率超过
索引碎片整理的四种方法: 1)删除索引并重建 2)使用 DROP_EXISTING 语句重建索引 3)使用 ALTER INDEX REBUILD 语句重建索引 4)使用 ALTER INDEX REORGANIZE 重新组织索引 --1.查看碎片 SELECT DB_NAME() AS DatbaseName , SCHEMA_NAME(o.Schema_ID) AS SchemaName , OBJECT_NAME(s.[object_id]) AS TableName , i.name A