Statement Matching Criteria

SAP ASE matches an ad hoc SQL statement to a cached statement by the SQL text and by login (particularly if both users have sa_role), user ID, database ID, and session state settings.

The relevant session state consists of settings for these set command parameters:

Settings for these parameters determine the behavior of the plan SAP ASE produces for a cached statement. See the Reference Manual: Commands.

Note: You must configure set chained on/off in its own batch if you enable the statement cache.