Franck Pachot
Jul 2, 2024

--

I'm using the shift row to have a single lock when updating any doctor on this shift. Serializable uses range/predicate locks (shift_id = 1). I can do the same with a SELECT FOR UPDATE on the parent row. It could be a SELECT FOR SHARE, but SELECT FOR UPDATE also avoids lost updates.

--

--

Franck Pachot
Franck Pachot

Written by Franck Pachot

Developer Advocate for YugabyteDB (Open-Source, PostgreSQL-compatible Distributed SQL Database. Oracle Certified Master and AWS Data Hero.

No responses yet