Analyze, Repair and Optimize script
Posted: Thu Oct 16, 2003 6:26 am
I am writing a maintenance-deamon which is executing CHECK TABLE, ANALYZE TABLE and OPTIMIZE TABLE once at night. If CHECK TABLE fails for at least one table, then the rest will be skipped.
The question is if the order of the statements is ok this way.
A second question would be, if I should run a REPAIR statement automatically if CHECK fails. Are there any more tasks that I should perform nightly in order to keep my database healthy and in a "high performance shape"?
And another general question: Do I have to take down my Application that is using the MySQL-DB in order to perform the
CHECK, ANALYZE and OPTIMZE commands?
Anyone got a scrip they use that does this?
Thanks
Mark
The question is if the order of the statements is ok this way.
A second question would be, if I should run a REPAIR statement automatically if CHECK fails. Are there any more tasks that I should perform nightly in order to keep my database healthy and in a "high performance shape"?
And another general question: Do I have to take down my Application that is using the MySQL-DB in order to perform the
CHECK, ANALYZE and OPTIMZE commands?
Anyone got a scrip they use that does this?
Thanks
Mark