It felt like the right time for us to look back at some useful commands for table maintenance that some of us may not have mastered as much as we might like to think.
In my post about gathering index statistics, I referred to
ANALYZE TABLE, and
REPAIR TABLE — but I never explained in depth what
the different commands do, and what the differences between them
are. That is what I thought I would do with this post, focusing
on InnoDB and MyISAM, and the differences in how they treat those
commands. I will also look at different cases and see which one
is right for in each case.