Scalable Database Server, HiRDB Version 8 Description

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

5.10.4 Holdable cursor

A cursor that is not to be closed even when a COMMIT statement is executed is called a holdable cursor. When a holdable cursor is specified, it can be kept open until one of the following SQL statements is executed:

A holdable cursor can reduce the incidence of locked resources, because it is possible that a COMMIT statement will be executed in the middle of a retrieval or in the midst of updating a large volume of data. Furthermore, because the COMMIT statement can be executed while the cursor is open, synchronization point dumps can be enabled to reduce restart time even when a large volume of data must be retrieved or updated. For details about holdable cursors, see the HiRDB Version 8 UAP Development Guide.

Specifying a holdable cursor
To use a holdable cursor, specify UNTIL DISCONNECT or WITH HOLD in DECLARE CURSOR.