When a SQL statement is used inside a cursor declaration, the query plan that Adaptive Server generates is different than the query plan that Adaptive Server generates for the same SQL statement used without a cursor declaration.
When the SQL Scanner finds that a SQL statement that has a FOR READ ONLY or FOR UPDATE clause and is used within a cursor declaration, the retrieval of the query plan is embedded in a cursor declaration so that the query plan matches the query plan that is used when the SQL statement is executed.
No change is made to the SQL statement.
Note: When you use the Send to SQL Optimizer function, the SQL for Cursor checkbox is automatically selected in the SQL Optimizer window.
© ALL RIGHTS RESERVED. Nutzungsbedingungen Datenschutz Cookie Preference Center