DB2 Version 9.7 for Linux, UNIX, and Windows

num_executions - Statement executions monitor element

The number of times that an SQL statement has been executed.

Table 1. Table Function Monitoring Information
Table Function Monitor Element Collection Level
MON_GET_PKG_CACHE_STMT table function - Get SQL statement activity metrics in the package cache Always collected
MON_GET_PKG_CACHE_STMT_DETAILS table function - get detailed metrics for package cache entries Always collected
Table 2. Snapshot Monitoring Information
Snapshot Level Logical Data Grouping Monitor Switch
Dynamic SQL dynsql Basic
For snapshot monitoring, this counter can be reset.
Table 3. Event Monitoring Information
Event Type Logical Data Grouping Monitor Switch
Package cache - COLLECT BASE DATA

Usage

You can use this element to identify the most frequently executed SQL statements in your system.

At the package cache level, use this element to compute averages for the activity metrics reported per statement. For example, the average CPU usage for an execution of a statement reported at the package cache level can be calculated by the following formula:
total_cpu_time / num_exec_with_metrics

Use the num_exec_with_metrics monitor element instead of the num_executions monitor element when computing averages, since the num_executions monitor element counts all executions of a statement, regardless of whether or not the execution of the statement contributed to the activity metrics that are reported.