List:General Discussion« Previous MessageNext Message »
From:Steven Staples Date:June 18 2010 1:21pm
Subject:Table Consistency/analize/check/repair
View as plain text  

I had an issue yesterday, where one of my tables ended up being closed
improperly, and needed to be repaired.   This isn't really an issue in
itself, but I didn't know about it until 2 hours after it happened, and a
script was trying to write to that table, and it failed, which caused a
backup on that script for inserting into another table.

ANYWAY, what I am wondering is, is what would be the best way to check all
my tables for errors/issues, and then run a repair on the table if it finds
an issue?

I have at least 30 tables, each having about 3-6 million rows in each, and
each table is about 2-3gigabytes in size.   So, I would like to be able to
check them only if they have anything that has changed (there is a table
created for each month of the year, for the last 2 years), it would be nice
if I didn't have to stop or put a lock on each table if I didn't have to,
and it would also be great if it was quick (running at like 2am, and
completing before 6am would be my time frame, and then Sunday morning from
2am to 8-10am is ok)

Any ideas for scripts, or premade scripts would be great.  Also, if this
would traverse to the slave mysql server too, that would be ideal.

Thanks in advance,

Steven Staples

Table Consistency/analize/check/repairSteven Staples18 Jun
  • Re: Table Consistency/analize/check/repaira.smith18 Jun
    • Re: Table Consistency/analize/check/repairPrabhat Kumar18 Jun