Cursors And Versioning; Cursor Sensitivity; Cursor Scrolling - Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual

Table of Contents

Advertisement

Cursors in transactions

Cursors and versioning

Cursor sensitivity

Cursor scrolling

312
The rows in a cursor, like those in a table, have no order associated with them.
The
command steps through the rows, but the order may appear
FETCH
random and can even be inconsistent. For this reason, you will want to impose
an order by appending an
When you use cursors, Adaptive Server IQ needs to be able to manage multiple
versions within a single transaction. For example, assume that you open a
cursor called
cust_cursor
that table later on at time y. Adaptive Server IQ needs to retain the version of
the
table from time x until you are done using
customer
See "Effect of rollback" for what happens to cursors during a rollback of the
database.
Adaptive Server IQ's support for cursors is oriented toward their likely use in
DSS applications. The following sections discuss specific cursor
characteristics with implications for transaction processing.
A cursor is said to be sensitive if its membership—the data rows it returns—
can vary from the time it is opened until the time it is closed. An insensitive
cursor has its membership fixed when it is opened. Adaptive Server IQ
supports only insensitive cursors.
Adaptive Server IQ cursors can be either scrolling or non-scrolling. Non-
scrolling cursors allow only the command forms
to find and retrieve data. They do not keep track of which rows
RELATIVE 0
have been fetched. A cursor declared as
cursor declared as
SCROLL
You can force all cursors to be non-scrolling by setting the option
FORCE_NO_SCROLL_CURSORS
save on temporary storage requirements if you are retrieving very large
numbers (millions) of rows.
phrase to your
ORDER BY
at time x that uses the
customer
DYNAMIC SCROLL
.
to
. You may want to use this option to
ON
statement.
SELECT
table. You then update
.
cust_cursor
and
FETCH NEXT
FETCH
is the same as a

Advertisement

Table of Contents
loading

Table of Contents