Yep. I see this too at work. InnoDB is in my opinion really good at handling concurrent workloads. So good I was surprised when I eventually found a project that was having locking issues. SHOW ENGINE INNODB STATUS showed queries had been waiting for hours on some locks they would never get. Yeah, it's a large and busy database, but it took me by surprise nevertheless.
It turns out, while InnoDB handles concurrent UPDATEs very efficiently, a combination of transactions that DELETE and INSERT rows - even just in the same general area of a table - will make the transactions wait for each other. Hence a workload that does a lot of inserts and deletes may get you into trouble. The solution is to change to READ COMMITTED or even READ UNCOMMITTED mode.
Thanks to Aaron from Ideeli for writing a proper blog about this, so I don't have to :-)
Update: Tagged Drizzle. Since this is an InnoDB issue, it of course applies just the same for Drizzle users too.
- Log in to post comments
- 9735 views
TX Isolaton
Given that the default transaction isolation mode is READ COMMITTED, what level were you running at before you switched?
MySQL default is REPEATABLE
MySQL default is REPEATABLE READ http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sys…