mysql> optimize table *.database; ??

michaelsanford

Translator, Web Developer
I've got a cron backup script that runs locally and connects to my various databases remotely and dumps them.

What I'd ideally like to be able to do to them before dump is optimize the whole lot. However, I can't find any command that will let me batch optimize all my tables.

I'm not sure how to use nesting in MySQL to do something like, say, optimize table 'show tables'; and in fact I think that's impossible anyway...

Ideas?
 
Back
Top