The bottleneck of my app is concurrent updates to the same row in MySQL. Losing some updates wouldn't be nearly as bad as having them all to wait for each other to finish. Is there any way in MySQL to only update a row if there's no other concurrent update?
Asked
Active
Viewed 38 times
1
-
1See if this helps: http://dba.stackexchange.com/questions/22286/similar-function-nowait-in-mysql – mustaccio Feb 12 '17 at 17:44
-
1Let's fix the problem a different way. What is hanging onto the record so long that it matters? That is, if we speed that up, you question becomes moot. – Rick James Feb 13 '17 at 00:06
-
@James I'm not doing transactions, just updates, I don't think there are optimization opportunities inside an update statement, unless it could be affected by SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED – Jader Dias Feb 13 '17 at 21:54
-
@mustaccio I'll try that. – Jader Dias Feb 13 '17 at 21:54