Sybase ASE Version: 15.0.3
We have the row level locking on table 'mytable' and we are seeing the following deadlock very often. We have an index on col1 and iupdate will finish so fast.The following SQL is comming via application.
Deadlock Id 7: detected. 1 deadlock chain(s) involved.
Deadlock Id 7: Process (Familyid 0, Spid 69, Suid 4699) was executing a UPDATE command at line 1.
Deadlock Id 7: Process 69 was involved in application '<none>'.
Deadlock Id 7: Process 69 was involved on host name 'xxxxx'.
Deadlock Id 7: Process 69 was involved in transaction '$chained_transaction'.
SQL Text: update mytable set LastModDate=@p0, LastModEmpID=@p1 where col1=@p2
Deadlock Id 7: Process (Familyid 0, Spid 62, Suid 4699) was executing a UPDATE command at line 1.
Deadlock Id 7: Process 62 was involved in application '<none>'.
Deadlock Id 7: Process 62 was involved on host name 'xxxxxx'.
Deadlock Id 7: Process 62 was involved in transaction '$chained_transaction'.
SQL Text: update mytable set LastModDate=@p0, LastModEmpID=@p1 where col1=@p2
Deadlock Id 7: Process (Familyid 0, Spid 62) was waiting for a 'exclusive row' lock on row 0 page 289329 of the 'mytable' table in database 'mydatabase' but process (Familyid 0, Spid 69) already held a 'shared row' lock on it.
Deadlock Id 7: Process (Familyid 0, Spid 69) was waiting for a 'exclusive row' lock on row 0 page 289329 of the 'mytable' table in database 'mydatabase' but process (Familyid 0, Spid 62) already held a 'shared row' lock on it.
Deadlock Id 7: Process (Familyid 0, Spid 69) was chosen as the victim.
Victim process host = `xxxxx', user = `user1' program name = `' host processes = `' .
End of deadlock information.
Do you have any idea how to avoide this deadlock ?
Thanks
Kris