Every saturday at 8am I've the following sh
script which makes a maintenance on all my databases. I run a mysqlcheck
with --check
, --optimize
and --analyze
.
This is the script:
# 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
The thing is that when this .sh
is running it takes a lot of disk space. Here's a screenshot of my Amazon RDS free disk space:
Which of the three comands is taking so much disk space to make those mysqlchecks
? --check
, --optimize
or --analyze
? Or the three of them?
I can't find anything about this on the official documentation.
Thanks in advance.