title: MySQL INSERT INTO SELECT very slow
body: <p>I just created an empty table <code>document_test</code> which is a copy of the <code>document</code> table. I then add a new column host to <code>document_test</code> and copy everything else from <code>document</code>. The statement is like:</p>
  
  <pre><code>INSERT INTO document_test (id,col1,col2,col3,col4) SELECT * from document;
  </code></pre>
  
  <p>The <code>document</code> table contains about 5.5 million rows and I have disabled the keys in <code>document_test</code>, set <code>foreign_key_checks</code> to 0 and <code>unique_checks</code> to 0. This <code>INSERT</code> commands has been running for two days on a Linux server and has not been finished. The <code>SHOW PROCESSLIST</code> displays the state is "Sending Data". The <code>SELECT count(*) FROM document_test;</code> command returns 0. However, I do see from the <code>SHOW TABLE STATUS</code> command that the number of rows in <code>document_test</code> is non-zero. Interestingly, presumably, the row number should increase monotonously, but it is NOT.  The results of four consecutive queries are 3299583, 3325775, 3299730 and 3341818! </p>
  
  <p>This is something that completely confuses me. Could someone help me on:
  (1) is it inserting data?
  (2) how to finish this insert in a timely manner? 
  (2) is there any way to check the status of this <code>INSERT INTO SELECT</code> command? (what next after "sending Data")</p>
  
  <p>Unfortunately, I did not turn on the slow-query-log and profiling before running this command. </p>