Q

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.

This was first published in January 2007

Dig deeper on Open source databases

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataCenter

SearchServerVirtualization

SearchCloudComputing

SearchEnterpriseDesktop

Close