Scalable Database Server, HiRDB Version 8 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.

Figure 3-11 shows the processing flows of an ordinary retrieval and of a retrieval 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:

Because unlocked conditional search performs a conditional search without locking items, if it is executed simultaneously with an updating transaction, the result may not be the same as would have been the case with an ordinary retrieval.