I suffered a similar problem with MySQL very recently. During a routine adding of new records to our database and updating old records, my computer (Windows XP) crashed and seemed to have left some of the index tables in disarray.
After that reading of some records failed for no obvious reason with a so<mewhat helpful error message ("[ERROR] C:\data\Program Files\MySQL\MySQL Server 5.1\bin\mysqld: Incorrect key file for table '.\pandirecords\claims.MYI'; try to repair it"). Running the full check and repair suite fixed it in less than an hour (in total about 600,000 records in that database).
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James