Concurrency recommendations for application designers

Application designers can take certain general actions to promote concurrency without compromising data integrity.

Procedure

To promote concurrency without compromising data integrity, use any of the following approaches:

  • Program applications to access data in the same order.
  • Commit work as soon as doing so is practical, to avoid unnecessary lock contention, even in read-only applications.
  • Include logic in your application program to retry after a deadlock or timeout to attempt recovery from the contention situation without assistance.
  • Bind most applications with the ISOLATION(CS) and CURRENTDATA(NO) options.
    These options enable Db2 to release locks early and avoid taking locks in many cases.
  • Use global transactions, which enables Db2 and other transaction managers to participate in a single transaction and thereby share the same locks and access the same data.