Hold Cursors; Positioned Operations; Cursor Command Syntax And Examples; Controlling Message Logging For Cursors - Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual

Table of Contents

Advertisement

Hold cursors

Positioned operations

Cursor command syntax and examples

Controlling message logging for cursors

Specifying the
option when you open a cursor keeps the cursor open past
HOLD
the end of the transaction, if the transaction ends in a
does not remain open across a
Although the
option is not commonly used in a DSS environment, with
HOLD
long transactions and no positioned updates, it may prove useful in some
situations. For example, many existing applications expect to use hold cursors,
and some ODBC drivers use hold cursors by default.
Adaptive Server IQ provides the version management needed for hold cursors.
Hold cursors do impact performance. All resources used by the cursor,
including memory, disk space, and process threads, are held until the cursor is
closed.
In a positioned operation, the current location of the cursor determines where
a read or write operation begins. Adaptive Server IQ supports positioned
fetches, which can be helpful in long query transactions. It does not support
positioned updates, which are intended for shorter insertions and deletions. For
the most part, updates to IQ databases are likely to involve large amounts of
data; repositioning is a very minor part of such write operations.
For more information on using cursors in procedures, including examples of
cursor use, see Chapter 6, "Using Procedures and Batches". For syntax of
cursor-related commands, see the Adaptive Server IQ Reference Manual.
By default, cursor operations are not logged in the IQ message file. If you need
to track cursor operations in order to determine the cause of a problem, turn on
the Log_Cursor_Operations option to produce a message each time a cursor is
opened or closed. See the Adaptive Server IQ Reference Manual for details.
CHAPTER 8
Transactions and Versioning
COMMIT
in which a cursor is opened.
ROLLBACK
. A hold cursor
313

Advertisement

Table of Contents
loading

Table of Contents