Understanding DB2®: Learning Visually with Examples
by Raul F. Chong, Clara Liu, Sylvia F. Qi, Dwaine R. Snow
11.7. Techniques to Avoid Locking
It is good to know how to diagnose locking problems, but it is even better to know how to prevent them. Avoiding locking problems requires a good application design. The following is a list of items you should consider when developing your applications. For a detailed explanation of these and other techniques, refer to the DB2 UDB Administration Guide.
Choose the appropriate isolation level: UR, CS, RS, or RR. As discussed earlier, UR allows for the most concurrency and the least number of locks required, while RR allows for the least concurrency and the most number of locks required. For example, if your application is used for estimation purposes and the exact value of columns is not needed, isolation UR should ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access