EntityFrameworkCore.SqlServer.SimpleBulks icon indicating copy to clipboard operation
EntityFrameworkCore.SqlServer.SimpleBulks copied to clipboard

Does the merge statement need the HOLDLOCK hint?

Open coderdnewbie opened this issue 4 years ago • 0 comments
trafficstars

I have seen other solutions use the ‘WITH (HOLDLOCK)‘ hint when generating the merge statement.

Is this hint missing from your solution?

See https://weblogs.sqlteam.com/dang/2009/01/31/upsert-race-condition-with-merge/

Also, do you drop the temporary table when you are finished with it as I could not see this code.

coderdnewbie avatar Feb 22 '21 21:02 coderdnewbie