List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:March 11 2006 3:31am
Subject:Re: Care and feeding of MySQL tables (aka Preventative Maintenance via Cron)
View as plain text  
In the last episode (Mar 10), Ren Fournier said:
> Just curious, what cron jobs do you schedule for automatically
> checking/repairing/analyzing/optimizing MyISAM tables?
> 
> I have been doing this periodically, manually for a while, but I
> figured cron is the way to go.
> 
> Also, what parameters are you using? I am thinking of running the
> following cron jobs:
> 
> mysqlcheck --all-databases --auto-repair (daily)

If a daily repair is required, you have serious problems.  If you ever
get corrupt tables at all (barring things like unexpected power
outages), you have problems, and should try and narrow down the cause
rather than look the other way and repair the damage :)

> mysqlcheck --all-databases --analyse (weekly)
> mysqlcheck --all-databases --optimize (weekly)

optimize does an analyze while it rebuilds the index file.

-- 
	Dan Nelson
	dnelson@stripped
Thread
Care and feeding of MySQL tables (aka Preventative Maintenance via Cron)RenĂ© Fournier11 Mar
  • Re: Care and feeding of MySQL tables (aka Preventative Maintenance via Cron)Gary Richardson11 Mar
  • Re: Care and feeding of MySQL tables (aka Preventative Maintenance via Cron)Dan Nelson11 Mar