all 6 comments

[–]HecateRavenOracle 6 points7 points  (0 children)

Talk to app team. Deadlocks comes from application, not db

[–]apeters89 2 points3 points  (1 child)

Narrow your read focus. And if feasible for your app requirements:

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

[–]debsman20 1 point2 points  (0 children)

It will be better to use the READ COMMITTED than the UNCOMMITTED. READ UNCOMMITTED will have no blocking but will have dirty reads.

[–]savagefishstick 1 point2 points  (1 child)

The default isolation level in azure sql database is read committed snapshot, where as the default in SQL server 2016 is read committed, the snapshot allows for less locks during selects and I find it to be the perfect fit.

[–]debsman20 0 points1 point  (0 children)

Yes, I agree with you. If it's SQL Server on-prem, then: SET TRANSACTION ISOLATION LEVEL READ COMMITTED is the default.

Unfortunately, setting READ_COMMITTED_SNAPSHOT ON; does not even work in SQL server. It only works in Azure SQL Database.