[thelist] optimizing/checking tables

Matt Warden mwarden at gmail.com
Thu Apr 21 13:34:32 CDT 2005


On 4/21/05, Dan McCullough <dan.mccullough at gmail.com> wrote:
> I'm upgrading my site tonight which includes several new tables I
> would like to optimize and check the tables after I run the update,
> with mysql shutdown.  what would be the best thing to do.

Optimize them for.............................. what? What problem are
you trying to fix?

If you know the queries and updates/deletes you will be performing,
you can run them with EXPLAIN and see whether you should add any
indexes, etc. But, don't go index-crazy (i.e., don't fix a problem
that doesn't exist).

http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/EXPLAIN.html

Also, might as well run some ANALYZE TABLEs (of isamchk -a if you have
an older version of MySQL):

http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/ANALYZE_TABLE.html


-- 
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.


More information about the thelist mailing list