Chat now with support
Chat with Support

SQL Optimizer for SAP ASE 3.8 - Installation Guide

SQL for Cursor Checkbox

Adaptive Server uses a different query plan for a SQL statement that is embedded in a cursor declaration from the query plan when the SQL statement is not embedded in a cursor. This needs to be taken into account when retrieving the query plan or run time and also when generating SQL alternatives.

Therefore, if the original SQL statement comes from or will be embedded in a cursor declaration then you need to select SQL for Cursor in the SQL Editor pane of SQL Optimizer window. This enables cursor simulation when retrieving the query plan and run time information.

This checkbox is automatically selected in the SQL Editor pane when you use the Send to SQL Optimizer function from the SQL Scanner if the SQL was extracted from within a cursor declaration.

In Adaptive Server 15 or later, the Declare Cursor Setting window is also available to select specific cursor settings.

Cursor Arguments

The cursor arguments should match the settings used for the SQL statement in your application code.

Cursor Type Description

SEMI-SENSITIVE

Specify that the worktable which holds the result set is populated only as the rows are fetched. Therefore changes to the data that occur while the cursor is opened may be visible in the result set.

INSENSITIVE

Specify that the data is copied to a worktable when the cursor is open which makes the data insensitive to changes in the data that may occur while the cursor is opened.

SCROLL

Specify that the cursor is scrollable meaning that you can position the cursor anywhere in the cursor result set for as long as the cursor is open. All scrollable cursors are read only.

NO SCROLL

Specify that the rows are retrieved one row at a time. All update cursors are non-scrollable.

 

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating