title: How To Avoid Repair With Keycache?
body: <p>I have had some experience with optimizing the my.cnf file but my database has around 4 million records (MyISAM).  I am trying to restore from a mysqldump but every time I do I eventually get the dreaded "Repair With Keycache", that may take days. Is there any way to get past this and let it roll as "Repair By Sorting"?</p>
  
  <p>I have 2GB RAM, Dual Cores, lots of extra hard-drive space.</p>
  
  <p>Snip out of my.cnf:</p>
  
  <pre><code>set-variable = max_connections=650
  set-variable = key_buffer=256M
  set-variable = myisam_sort_buffer_size=64M
  set-variable = join_buffer=1M
  set-variable = record_buffer=1M
  set-variable = sort_buffer_size=2M
  set-variable = read_buffer_size=2M
  set-variable = query_cache_size=32M
  set-variable = table_cache=1024
  set-variable = thread_cache_size=256
  set-variable = wait_timeout=7200
  set-variable = connect_timeout=10
  set-variable = max_allowed_packet=16M
  set-variable = max_connect_errors=10
  set-variable = thread_concurrency=8
  </code></pre>