Ask the Expert

Corrupted MySQL tables

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?

    Requires Free Membership to View

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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: