Ways to improve performance for multiple users

Locking ensures the integrity and accuracy of data. However, locking is sometimes too restrictive and can cause slow performance and poor concurrency. Understanding how locking works can help you make good decisions for performance. Locking is critical to performance, and also provides recommendations for promoting concurrency.

Db2 uses locks on user data. The main reason for using locks is to ensure the integrity, or accuracy, of the data. Without locks, one user might be retrieving a specific data item while another user might be changing that data. The result is that the first user retrieves inaccurate data. In the Db2 for z/OS® environment, which includes vast amounts of data and large numbers of users and transactions, the prospect of inaccurate data is unacceptable. Therefore, Db2 for z/OS provides comprehensive locking to ensure data integrity.

Despite the importance of data integrity, locking can sometimes be too restrictive. If an application process locks too much data, other users, utilities, and application processes must wait for the locked data. This situation results in poor concurrency. Concurrency is the ability of more than one application process to access the same data at essentially the same time. Db2 for z/OS handles the trade-off between concurrency and data integrity to maximize concurrency without sacrificing the integrity of the data.