Hey
i have a deadlock im trying to deal with for a long time and no success i will love some help
this is my table :
private const string CreateLicenses =
"CREATE TABLE [Licenses] (" +
"
[ID] varchar(255) NOT NULL," +
" [Source] varchar(64) NOT NULL," +
"
[IMEI] varchar(64) NULL," +
"
[IMSI] varchar(64) NULL," +
"
[Version] varchar(32) NULL," +
"
[Device] varchar(64) NULL," +
"
[Mailbox] varchar(64) NULL," +
"
[Platform] varchar(32) NULL," +
"
[VariantID] varchar(32) NULL," +
"
[VariantVer] varchar(32) NULL," +
"
[GroupID] varchar(20) NULL," +
"
[FirstTime] datetime NULL," +
"
[LastTime] datetime NULL," +
" [IsActivated] int," +
" PRIMARY KEY ([ID], [Source]))";
i have an index on the primary key and source
my deadlock cause from an update on all the fields with a where clause of the primary key
when i trace the deadlock i see its the only statements in the deadlock is this update statement and i dont know how i can improve my update statement so it wont deadlock itself
i have 2190282 rows in that table and i did an execution plan on the update and this is the result
can someone help me with a way to fix it?