I'm sure I remember seeing a plugin for that. Might have been a "database backup" plugin. I remember seeing the optimize feature there though.
You could try giving that a go.



Its called: WP-DBManager