MySQL:mysqlcheck占用太多磁盘空间来执行操作

时间:2018-09-12 12:30:28

标签: mysql database mysqlcheck

每个星期六的上午8点,我都有以下sh脚本可以对所有数据库进行维护。我使用mysqlcheck--check--optimize运行--analyze

这是脚本:

# check: checks table for integrity errors
mysqlcheck -u root -h mydbendpoint.com -p'mypass' --check --all-databases

# optimize: reorganizes physical storage of table and index data
mysqlcheck -u root -h mydbendpoint.com -p'mypass' --optimize --all-databases

# analyze: rebuild and optimize the performance of indexes
mysqlcheck -u root -h -h mydbendpoint.com -p'mypass' --analyze --all-databases

问题是,运行此.sh时会占用很多磁盘空间。这是我的Amazon RDS可用磁盘空间的屏幕截图:

enter image description here

三个命令中的哪个要占用这么多磁盘空间来制作mysqlchecks--check--optimize--analyze?还是三个?

我在official documentation上找不到任何相关内容。

谢谢。

0 个答案:

没有答案