title: Large Table repair/indexing and myisam_sort_buffer_size
body: <p>I have a MySQL table using the MyISAM engine with 6 INT columns, 1 SMALLINT, 2 TINYINT and 1 FLOAT column.
  It has billions of rows (the data file is 100GB). I was trying to index on <em>all</em> of the columns by enabling keys, but that never happened. Trying "myisamchk -r <em>tableName</em>" gave the following error:</p>
  
  <pre><code>- recovering (with sort) MyISAM-table 'tableName'                               
  Data records: 662929483                                                         
  - Fixing index 1                                                                
  myisamchk: error: myisam_sort_buffer_size is too small                          
  MyISAM-table 'tableName' is not fixed because of errors                         
  Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
  </code></pre>
  
  <p>Using "myisamchk -rov <em>tableName</em>" instead takes forever again (presumably because it is using the keycache method, not the sort method).</p>
  
  <p>Does it not make sense to increase myisam_sort_buffer_size in this case (The answer to <a href="https://stackoverflow.com/questions/7871027/myisam-sort-buffer-size-vs-sort-buffer-size">myisam_sort_buffer_size vs sort_buffer_size</a> suggests increasing the value never makes sense). The machine has 32GB of RAM.</p>