Home >Database >Mysql Tutorial >查看Mysql索引页碎片_MySQL

查看Mysql索引页碎片_MySQL

WBOY
WBOYOriginal
2016-06-01 13:43:161794browse

bitsCN.com
查询索引页碎片:SHOW TABLE STATUS LIKE '表名'; //当Data_free 列值大于0时表示有碎片(只要删除过数据就会产生,前提是有建立索引) 优化表:OPTIMIZE TABLE 表名; 建立索引条件(或):表数据量大(数据量小的话建立索引效果不明显,反而浪费物理空间,增加维护表难度等)主键列/外键列(加快联接)/常用搜索列 查看数据库编码:show variables like 'character_set%';设置返回结果编码:SET character_set_results= utf-8;   作者 897457487 bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn