Problem solve Get help with specific problems with your technologies, process and projects.

Corrupted MySQL tables

Correcting corrupted MySQL tables with checksum.

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.

Dig Deeper on Linux servers

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.