Quantcast
Channel: Planet MySQL
Viewing all articles
Browse latest Browse all 18776

MySQL locking with INSERT/DELETE workload

$
0
0

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.

read more


PlanetMySQL Voting: Vote UP / Vote DOWN

Viewing all articles
Browse latest Browse all 18776

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>