Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I recently moved one of our slave databases to a new server, the database is purely used for offsite replication/backup and doesn't handle any of the live traffic.

Since moving, the new server seems to constantly want to run CHECK TABLE across the whole database. We've got a a few large tables, one being ~10GB, so it locks everything up for a few minutes while it's checking the table and in result queues up the queries.

I've looked at possible causes as to why it needs to check so often, but can't seem to find a reason.

I was wondering if anyone here has experienced this, or would know of a reason?

share|improve this question
    
what mysql version was the old server running, and what is the new one running? Also, on a limb, have you verified the binary log doesn't contain the CHECK TABLE statements? –  Derek Downey May 10 '12 at 14:26
    
Are you seeing any messages in the error log file to the tune that the table is marked as crashed? –  PythianMoore May 10 '12 at 15:53
    
Please show your my.cnf –  RolandoMySQLDBA May 10 '12 at 18:24
    
@DTest We're using MySQL Ver 14.14 Dist 5.1.61. I've checked the log and no mention of CHECK TABLE –  adam0345 May 11 '12 at 7:48
    
@PythianMoore Nope, error log is clear. –  adam0345 May 11 '12 at 7:48
show 1 more comment

1 Answer

If your database tables are MyISAM, you might have given the server option myisam-recover in your my.cnf, which will turn on automatic MyISAM checking.

If recovery is enabled, each time mysqld opens a MyISAM table, it checks whether the table is marked as crashed or was not closed properly.

share|improve this answer
    
We do have myisam-recover = BACKUP, but the config is the same as the previous server, of which this issue never occurred. –  adam0345 May 11 '12 at 7:50
    
Regardless, I would comment that out to see if the issue goes away on your new server, just to verify. –  Derek Downey May 11 '12 at 13:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.