3 ms·
SELECT FOR UPDATE is a much better default, though. Updates end up ordered by which did the update first, which tends to match intuition. Of course the callers
by dontlaugh 3y ago
SELECT FOR UPDATE is a much better default, though. Updates end up ordered by which did the update first, which tends to match intuition.
Of course the callers may be surprised at being out-raced, so you still need to deal with that. Often it's enough to return the updated value.