>>>>> "matthew" == matthew mcglynn <matt@stripped> writes:
>> time, as it is the responsibility of the user to run isamchk regularly,
matthew> Is there any way to do this on a production system ?
matthew> I'm sure this question has been asked a thousand times,
matthew> and I already know the answer (no).
matthew> We run Linux, so we use --skip-locking, and most of the
matthew> tables are very busy; the server does 40-50 queries per
matthew> second averaged over a day's time.
matthew> This particular table contains 500,000 - 1M rows, including
matthew> blob fields, so even if we use OPTIMIZE TABLE it takes
matthew> about 2 minutes on this hardware. That's a long time for
matthew> the table to be locked up; in 2 minutes, this table might
matthew> see a few hundred INSERTs and SELECTs. It would noticeably
matthew> impact the performance of the website.
matthew> I understand that the alternative is to have the thing
matthew> get corrupt periodically, which obviously isn't good.
matthew> Maybe we'll need to come up with some kind of load-
matthew> balancing mechanism whereby two tables are used so each
matthew> can be optimized while the other is handling queries.
matthew> Any other suggestions ?
The new MyISAM in MySQL 3.23 can automaticly detect if a table is not
closed properly and will also flag a table as 'corrupt' if it finds
something wrong with it. myisamchk has the new option --fast, which
only checks tables that has been updated, which makes checking tables
Anyway, we have VERY high on our todo to integrate myisamchk into
MySQL 3.23 and also add automatic repair of corrupted tables. This
should fix most problems of these kinds....