Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

3.4.5 Unlocked conditional search

Unlocked conditional search does not lock items whenever retrieval processing is underway, but instead locks only those rows and key values that satisfy the retrieval condition. Unlocked conditional search can reduce the retrieval time compared to ordinary retrieval processing, because rows and key values that do not satisfy the retrieval condition are not locked.

Moreover, when updating and retrieval are executed simultaneously, it is unnecessary to wait for lock-release if another user is updating or adding rows that do not satisfy the condition. Consequently, the incidence of deadlocks and of lock-release timeouts is reduced.

The following figure shows the processing flows of an ordinary search and of a search using unlocked conditional search.

Figure 3-11 Processing flows of an ordinary retrieval and of a retrieval using an unlocked conditional search

[Figure]

An unlocked conditional search is used by specifying YES in the PDLOCKSKIP operand in the client environment definition.

An unlocked conditional search is effective under the following conditions:

Unlocked conditional search is not applied in the following cases even if it is specified:

Because unlocked conditional search does not involve locking, uncommitted data might be used for the conditional search. For example, if a conditional search is performed simultaneously with an updating transaction, the result of the conditional search might differ from the result of the update transaction processing.