The concurrency of the database system is one of the key factors that affect its performance. How to Improve the concurrency becomes a question to be considered. This article will introduce you to the three most commonly used Prevention Measures to Improve the concurrency of DB2 for your reference.
1. Reduce the isolation level, and read operations will not be blocked due to lock conflicts
Select... with UR
2. or change the locking time to reduce lock conflicts (in this way, the insert, update, and delete operations on the row will not lock select operations with different conditions)
Db2set DB2_EVALUNCOMMITTED = ON
Db2set DB2_SKIPDELETED = ON
Db2set DB2_SKIPINSERTED = ON
3. Add an index to the where field to reduce lock occupation.
Note:
Db2set DB2_EVALUNCOMMITTED = ON-this parameter checks the predicates before record locks to minimize the lock time;
Db2set DB2_SKIPINSERTED = ON-this parameter skips newly inserted data that has not been submitted. For example, this record is not found in the SELECT/UPDATE statement;
Db2set DB2_SKIPDELETED = ON-this parameter skips the newly deleted data that has not been submitted. For example, the SELECT/UPDATE statement does not wait for the submission of this record and considers it to have been deleted.