This article mainly tells you how to improve the concurrency in three IBM DB2 statements. The three methods are mainly to improve the concurrency: reduce the isolation level, the read operation will not be blocked because of lock conflicts. It will change the lock time, reduce lock conflicts, and add indexes to the where field to reduce lock occupation.
In DB2, three methods can be used to increase concurrency:
1. Reduce the isolation level, and read operations will not be blocked due to lock conflicts
Select... with UR
2. Change the lock locking time to reduce lock conflicts (so that the insert, update, and delete operations on the row won't 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. The above content is an introduction to the three methods for improving the concurrency in IBM DB2. I hope you will gain some benefits.
The above content is a description of the three methods for increasing concurrency in IBM DB2, hoping to help you in this regard.