Dead Lock
Problem 1
Why Deadlocks might occur ?
Why we may still get Deadlocks in Oracle ?
1. Row Lock Contention on Insert/Update
2. Unindexed Foreign Keys
3. Concurrent Insert Into Same Table with Unique Constraints
Possible Solutions
1. Ensure Foreign Key Columns Are Indexed
2. Sort IDs Consistently Before Insert/Update
3. Reduce Batch Size
4. Set Oracle Deadlock Retry Logic (App Side)
5. Avoid Mixing Insert and Update in Same Batch
6. Capture Deadlock Details
Can DBA help to check the deadlocks ?
Will the system become normal after a deadlock ?
Last updated