即使我将事务级别设置为未提交,我也会遇到此死锁。有什么我做错了吗?我以为我想在这里弄脏读。
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT
DISTINCT
venueCourt.Id,
错误
System.Data.SqlClient.SqlException: Transaction (Process ID 73) was deadlocked on thread | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
答案 0 :(得分:0)
如果查询与您并行,您可能会遇到死锁...虽然我对这样一个简单的查询感到非常惊讶。
尝试在查询结束时添加OPTION(MAXDOP 1)。