Our application performs these two queries:
select A.* from LETTUREAPERTE A
where IDAZIENDAOPERATORE=3
and
select A.* from LETTUREAPERTE A
where IDAZIENDAOPERATORE=2
according to the ID of the company a user is considering.
Well, while the second query is correctly executed, the first blocks and never executes. In LETTUREAPERTE
tables there are less than 400 records, some with IDAZIENDAOPERATORE
with 2, some other with 3.
I don't know why this is happening and why the first query blocks... I get this error in the end I get an error saying that process was chosen as a deadlock victim.
Transaction (Process ID 62) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
I even ran some queries to detect if there are some update locks on some records of that table but there's none. And so it must be because in the whole project we've never used UPDLOCK in queries...