0

I am finding it difficult to find solution for this deadlock. The select query is taking shared lock over index I_SEM_AGENT_COMPUTER_ID_PLUS, at the same time update query updates a record (say r1) in table and then tries to update the index I_SEM_AGENT_COMPUTER_ID_PLUS (this index has columns in include clause that are updated by update query ) However select is requesting record r1 in shared mode. What can be possible solution to this? Apart from creating a new non-clustered index for select. Note: Dirty reads not allowed, READPAST can't be used as this can return no records failing purpose of select here

4

1 回答 1

0

Finally solved this problem, rearranged both the queries to access the resources in the same order. That solved the problem.

于 2013-11-11T05:00:31.420 回答