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

查看Mysql索引页碎片_MySQL

WBOY
Release: 2016-06-01 13:43:16
Original
1799 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template