I am using MySQL 4.0.24 on a Windows2000 machine for a small but complicated application. The number of queries and updates may be 50 or 60 per hour on days except Monday. On Monday, it could be around 100 to 150. All my tables are MYISAM with first 3 columns cross-indexed. The total number of tables in the database is 50. During each entry and update more than 5 or 6 tables are opened and closed multiple times. A few times I've experienced corruption of tables. Most of the times the error was "can't open file: 'tableName.MYI'. (errno: 144)".
I've read somewhere that using CHECKSUM = 1 can reduce the chances of corruption in MYISAM tables. Is it correct? Will it affect the insert/update timing and query performance?
Setting CHECKSUM=1 when creating a table can help detect cases of table corruption. It does make insert and update operations a little bit slower, since the checksum must be calculated for each row. See also the "Corrupted MyISAM Tables" section of the manual.
This was first published in January 2007