Insensitive cursors

These cursors have insensitive membership, order, and values. No changes made after cursor open time are visible.

Insensitive cursors are used only for read-only cursor types.

Standards

Insensitive cursors correspond to the ISO/ANSI standard definition of insensitive cursors, and to ODBC static cursors.

Programming interfaces
Interface Cursor type Comment
ODBC, ADO/OLE DB Static If an updatable static cursor is requested, a value-sensitive cursor is used instead.
Embedded SQL INSENSITIVE
JDBC INSENSITIVE Insensitive semantics are only supported by the iAnywhere JDBC driver.
Open Client Unsupported
Description

Insensitive cursors always return rows that match the query's selection criteria, in the order specified by any ORDER BY clause.

The result set of an insensitive cursor is fully materialized as a work table when the cursor is opened. This has the following consequences:

  • If the result set is very large, the disk space and memory requirements for managing the result set may be significant.

  • No row is returned to the application before the entire result set is assembled as a work table. For complex queries, this may lead to a delay before the first row is returned to the application.

  • Subsequent rows can be fetched directly from the work table, and so are returned quickly. The client library may prefetch several rows at a time, further improving performance.

  • Insensitive cursors are not affected by ROLLBACK or ROLLBACK TO SAVEPOINT.