[ILUG] mysql "best practice" question

John Breslin John.Breslin at DERI.ie
Wed Apr 14 17:16:47 IST 2004


Hi -

You could have a script that would issue a few SQL CHECK TABLE tablename / 
REPAIR TABLE tablename / OPTIMIZE TABLE tablename commands, can't see any 
reason not to.  I know for example vBulletin (PHP-based) have a repair option 
in their admin control panel that does a few of those when things aren't 
running smoothly.

John.
--
>  Today, someone asked me to have a look at some slow PHP. It turns out
> they were doing a select on a table. Simple table, with nothing in it.
> 
>  But, it was 60MB in size. It took two seconds for a "select *" to
> complete. Bad. So, I ran myiasmchk and myasmpack on it, and it reduced to
> 1k in size, and selects worked *instantly*.
> 
>  This makes me happy.
> 
>  Is there any problem with writing a script to go through every database
> on the system, and run those two commands automatically every weekend, on
> every table ? 
> 
>  It seems to be a the postgres equivalent of "vaccuum", which is really
> needed on a busy system (and I was so happy when I discovered the
> pg_autovaacuum stuff).
> 
> john
> -- 
> Irish Linux Users' Group
> http://www.linux.ie/mailman/listinfo/ilug/
> 


Dr. John Breslin
DERI, NUI Galway
http://www.johnbreslin.com/
john.breslin at deri.ie




More information about the ILUG mailing list