Bug #47406 | Insert statement never ends (InnoDB) | ||
---|---|---|---|
Submitted: | 17 Sep 2009 10:40 | Modified: | 20 Nov 2009 11:36 |
Reporter: | Franck Wolff | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S1 (Critical) |
Version: | 4.1.22 | OS: | Linux (CentOS 5) |
Assigned to: | CPU Architecture: | Any | |
Tags: | insert, lock |
[17 Sep 2009 10:40]
Franck Wolff
[17 Sep 2009 10:59]
Valeriy Kravchuk
You have INSETT ... SELECT ... Please, send the results of EXPLAIN for that SELECT, with ? substituted by some realistic values of parameters. Looks like you just select to many rows to get the data you need to insert...
[17 Sep 2009 12:08]
Franck Wolff
Hi, Thanks for your quick response. I've attached the explain output. Quote: "Looks like you just select to many rows to get the data you need to insert..." The strange thing is that the insert... select... is very fast when it works (and I mean *exactly* the same request with the same values). Regards, Franck.
[19 Nov 2009 7:52]
Valeriy Kravchuk
Execution plan looks reasonably good. Can it be so that you update one of the tables used in SELECT part concurrently? Or run more than one similar INSERT ... SELECT at the same time? I'd like to get the results of SHOW INNODB STATUS when INSERT ... SELECT hangs.
[20 Nov 2009 11:34]
Franck Wolff
We have finally solved this problem by simplifying a lot the insert statement. Thanks for your help anyway, Franck.
[20 Nov 2009 11:36]
Franck Wolff
Found a workaround...