Monitoring tables for the statement cache

Once enabled, the Adaptive Server statement cache stores the SQL text of ad hoc update, delete, and select commands and other statements likely to be reused. When the statement cache is enabled, the query plans for these statements are saved for reuse. When a new statement is issued, Adaptive Server searches the statement cache for a plan to reuse. If Adaptive Server finds a plan to reuse, the statement does not need to be recompiled, which likely leads to improved performance.

For more information about the statement cache, see Chapter 3, “Configuring Memory,” in the System Adminitration Guide, Volume 2.

Literal parameterization allows Adaptive Server to recognize queries that are identical except for differeing in literal values in the where clause. In addition to performance benefits, literal parameterization leads to significant space reduction when the metrics and statements are stored in the cache.

The monitoring tables include two tables that can be used to analyze the status and performance of the statement cache: monStatementCache provides a summary snapshot of the statement cache, and monCachedStatement shows detailed information about each cached statement.