I'm surprised this would be a problem unless you have a very high traffic
service or there's something else going on with your code.
If it really is a problem, another option you could consider is a new
column with enforced uniqueness that stores some sort of mashup of the two
fields ( as simpl
update_or_insert first selects the record (if it exists) and then does the
create/update. I suppose when two requests come in very close to each
other, the second request is checking for the record before the first
request has had a chance to commit the insert. I'm not sure I would call
that a
2 matches
Mail list logo