mysql优化

show table status from db_name;

可以查看数据库中是否存在数据碎片。

碎片的产生是因为长时间的增删操作留下来的空白项。

清理碎片:

optimize table table_name;

清理碎片时最好关闭应用,清理碎片后对数据库读写操作有很大提升。

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>