Quote:
Originally posted by roga
Hi!
I'm confused about the maintenance functions of MySQL. There are ANALYZE, CHECK, REPAIR and OPTIMIZE. So what are the differences? Which one should I use for nightly maintenance?
Thanks in advance.
roga
|
ANALYZE is used to update the statistics table so MySQL uses the indexes more intelligently
REPAIR is used to repair corrupted tables
OPTIMIZE is used to "defragment" the tables (after lots of INSERT/UPDATE/DELETE)
CHECK is used to verify is a table is corrupted in any way... Useful to verify that after a server is stopped abruptely, all tables were closed properly