Include failure / warning counts in mon_get_pkg_cache_stmt
It's currently not possible to monitor the failure rate of an SQL statement. For example, count of dupkey on INSERT. Likewise for 'soft' errors (warnings) like +100 - row not found on INSERT or DELETE. High rates of these can be a significant drain on system resources and typically indicate either an application problem, or a lack of understanding of the data set. The dupkey problem is particularly challenging since the system will continue to run, but unless the application captures and handles the error, it often goes unnoticed, except for issues such as excessive lock wait and contention, especially in high concurrency environments such as on pureScale.
What is proposed are two new columns in MON_GET_PKG_CACHE_STMT
1) NUM_EXEC_WITH_FAILURE - on the same scale as NUM_EXECUTIONS but only counting executions which returned a negative SQLCODE
2) NUM_EXEC_WITH_WARNING - likewise, but for positive SQLCODEs.
Additionally, LAST_ERROR_SQLCODE and LAST_WARNING_SQLCODE would help on drill-down.
There is precedent for these, since MON_GET_CONNECTION currently reports on the number of failed activities (ACT_ABORTED_TOTAL) but this is a the connection level, and isn't helpful for diagnosing failures at the statement level.
Steve Rees Consulting Inc