Sample Header Ad - 728x90

Internal reason for killing process taking up long time in mysql

9 votes
3 answers
43259 views
I copied a big table's structure with (it is an **InnoDB** table btw) CREATE TABLE tempTbl LIKE realTbl Then I changed an index, and filled it up so I could run some test. Filling it was done using: INSERT INTO tmpTbl SELECT * FROM realTbl This took too long, so I wanted to stop this test.1 I killed the process while it was in a "Sending data" state: it is now "killed", and still in the state "Sending data". I know some killed processes need to revert changes and so could take (equally?) long to kill compared to how long they were running, but I can't imagine why this would be the case now: The whole table needs to be emptied. I'm curious as to what is happening that would take stopping/killing a simple query like this very long. To give you some numbers: the insert was running for an hour or 3, the kill is closer to 5 7 now. It almost looks like it runs a DELETE for every INSERT it did, and the delete takes longer then the insert did? Would that even be logical? (And if anyone knows how to kick my test-server back into shape that would be nice too, as it's eating some resources, but that's not really important at this moment :) ) ---------- 1) *I don't know yet why (it's a big table, 10M rows, but it should take that long?), but that's another thing / not part of this question :). It might be that my test could have been smarter or quicker, but that is also not the question now :D*
Asked by Nanne (285 rep)
Sep 12, 2011, 12:40 PM
Last activity: Aug 15, 2023, 09:58 PM