Calculating the EDM statement cache hit ratio
The EDM storage statistics provide information that can help you
determine how successful your applications are at finding statements in the cache and in the
catalog.
About this task
PREPARE REQUESTS ( A ) records the number
of requests to search the cache. FULL PREPARES ( B ) records the number
of times that a statement went through the optimization process to generate a new runtime structure,
which can be interpreted as the number of times a statement was not found in the cache or catalog.
LOOK-UP IN CATALOG ( C ) records the number of times that Db2 searched the statement in the catalog. To determine how often the dynamic statement was used from the cache, check the value in CACHE HIT RATIO ( D ). To determine how often a
dynamic statement was used from the cache or from the catalog, check the value in CACHE+CATALOG HIT
RATIO E .
Procedure
To calculate the EDM statement cache ratio

(PREPARE REQUESTS - (FULL PREPARES + LOOK-UP IN CATALOG)) / PREPARE REQUESTS = hit ratio
Example
The following figure shows the dynamic SQL statements part of the IBM® OMEGAMON® for Db2 Performance Expert on z/OS® statistics report.

DYNAMIC SQL,STMT, QUANTITY
--------------------------- --------
PREPARE REQUESTS A 210225
FULL PREPARES B 42681
SHORT PREPARES 167544
SHORT PREPARES 167544
BASED ON CACHE 154592
BASED ON CATALOG 12952
LOOK-UP IN CATALOG C 42685
CACHE HIT RATIO D (%) 73.54
CACHE+CATALOG HIT RATIO E (%) 79.70
TOTAL PREPARES 210232
EXPLICIT PREPARES 210232
IMPLICIT PREPARES 0
PREPARES AVOIDED 0
CACHE LIMIT EXCEEDED 0
PREP STMT PURGED 0
LOCAL CACHE HIT RATIO (%) N/C
CSWL - STMTS PARSED 0
CSWL - LITS REPLACED 0
CSWL - MATCHES FOUND 0
CSWL - DUPLS CREATED 0
For more information, see the IBM IBM OMEGAMON for Db2 Performance Expert on z/OS Report Reference.