question

Lukasz8519 avatar image
Lukasz8519 asked

update table many times in one procedure

hi,

one of stored procedure which i have to maintenance has 51 updates the same table with different condition, every update has parameter for cntrt_id (i have index here and rest of table is on include clause because table has 10 column), when this sp is run using SSMS with parameter for cntrt_id it works good, (i know that i can't run t-sql parallel) but when im running this SP using ADF on multiple thread i have deadlocks, and i really don't know what i should change to prevent deadlocks. I though that index cant prevent but in my opinion 51 updates kill this process, and i think that someone should start of thinking what kind of data and made some manipulation in those data before loading to DB instead of making updates.

maybe a could change isolation level to read commited isolation snapshot?

stored-proceduresazure sql dbupdate_query
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.