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
> 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).
> Irish Linux Users' Group
Dr. John Breslin
DERI, NUI Galway
http://www.johnbreslin.com/john.breslin at deri.ie
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!