![]() ![]() Another approach is to somehow "serialize" updates. One option is just to catch error and re-run failed transactions. They both change the same set of rows, and nothing guaranties in which order the rows are locked. Any advice would be greatly appreciated!Įach of your 2 update statements may cause deadlock when executing within different transactions, no matter explicit or implicit. I'm about 2 months into my career as a dba, and deadlocks have been difficult to get my head around. Doesn't actually fix the problem though, just makes it happen less often. Implementing some boolean logic in the second UPDATE to avoid running it unnecessarily.This, however, may impact other things that use the PK elsewhere. Removing the PK and making UserID the (non-unique) clustered index.Since the two updates don't really rely on each other, that seems viable. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |