IBM Support

Why stmt_exec_time is lager than actual execution time?

Technical Blog Post


Abstract

Why stmt_exec_time is lager than actual execution time?

Body

When you use the stmt_exec_time in MON_GET_PKG_CACHE_STMT table function to measure the query execution time, you might see that this value is extremely larger than the actual query execution time.
 
That's because that the stmt_exec_time value takes the number of agents into consideration. In case of a single agent executing an activity, the value will be pretty close to elapsed time by the thread. But if multiple agents are used for that activity, stmt_exec_time will show summation of whole execution time of every agents.
 
If you want elapsed time regardless of the number of agents working on the activity, you would better use the act_exec_time in MON_GET_PKG_CACHE_STMT.
 
For more detail, please check the knowledge center lins below.
1. stmt_exec_time - Statement execution time monitor element
 
2. act_exec_time - Activity execution time monitor element

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm13286125