The number of times that an SQL statement has been executed.
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 |
Snapshot Level | Logical Data Grouping | Monitor Switch |
---|---|---|
Dynamic SQL | dynsql | Basic |
Event Type | Logical Data Grouping | Monitor Switch |
---|---|---|
Package cache | - | COLLECT BASE DATA |
You can use this element to identify the most frequently executed SQL statements in your system.
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.