Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

On the other hand, you hardly every have to worry about weird locking problems.

It's nearly impossible to avoid deadlock in any reasonable complex use of MySQL.



If you use read committed, row based replication and explicit locks where necessary, rather than the default of repeatable read, avoiding deadlock isn't too hard.

It's usually the gap locks that bite you, I've found.

https://www.percona.com/blog/2012/03/27/innodbs-gap-locks/

Oh, and do all your deletes by primary key. Deletes with joins are especially good for creating too many locks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: