[ILUG] mysql "best practice" question
vincent at cunniffe.net
Wed Apr 14 16:13:00 IST 2004
John P. Looney wrote:
> 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 ?
'Optimise Table' (in phpMyAdmin or equiv) will clean and re-order the
indexes, which improves speed quite a bit for highly fragged tables.
'myisampack', on the other hand, creates a highly-optimised compressed
structure using a multiple-pass algorithm. This makes it very fast, but
More information about the ILUG