MON_GET_SERVICE_SUPERCLASS_STATS table function - Return statistics of service superclasses

The MON_GET_SERVICE_SUPERCLASS_STATS function returns basic statistics of one or more service superclasses.

Authorization

One of the following authorizations is required:
  • EXECUTE privilege on the routine
  • DATAACCESS authority
  • DBADM authority
  • SQLADM authority
  • WLMADM authority

Default PUBLIC privilege

None

Syntax

Read syntax diagramSkip visual syntax diagram MON_GET_SERVICE_SUPERCLASS_STATS ( service_superclass_name , member )

The schema is SYSPROC.

Routine parameters

service_superclass_name
An input argument of type VARCHAR(128) that specifies the name of a service superclass in the currently connected database. If the argument is null or an empty string, the data is retrieved for all of the superclasses in the database.
member
An input argument of type INTEGER that specifies a valid member number in the same instance as the currently connected database. Specify -1 for the current member, or -2 for all active database members. If the null value is specified, -1 is set implicitly.

Information returned

Table 1. Information returned by the MON_GET_SERVICE_SUPERCLASS_STATS routine
Column name Data type Description
SERVICE_SUPERCLASS_NAME VARCHAR(128) service_superclass_name - Service superclass name monitor element
DBPARTITIONNUM SMALLINT dbpartitionnum - Database partition number monitor element
LAST_RESET TIMESTAMP last_reset - Last Reset Timestamp monitor element
COORD_ACT_COMPLETED_TOTAL BIGINT coord_act_completed_total - Coordinator activities completed total monitor element
COORD_ACT_ABORTED_TOTAL BIGINT coord_act_aborted_total - Coordinator activities aborted total monitor element
COORD_ACT_REJECTED_TOTAL BIGINT coord_act_rejected_total - Coordinator activities rejected total monitor element
CONCURRENT_ACT_TOP INTEGER concurrent_act_top - Concurrent activity top monitor element
COORD_ACT_LIFETIME_TOP BIGINT coord_act_lifetime_top - Coordinator activity lifetime top monitor element
COORD_ACT_LIFETIME_AVG DOUBLE coord_act_lifetime_avg - Coordinator activity lifetime average monitor element
COORD_ACT_LIFETIME_STDDEV DOUBLE Standard deviation of lifetime for coordinator activities at nesting level 0 that were associated with this service superclass since the last reset. If the COLLECT AGGREGATE ACTIVITY DATA parameter of the service class is set to NONE, the value of the column is null. Units are milliseconds.

This standard deviation is computed from the coordinator activity lifetime histogram and may be inaccurate if the histogram is not correctly sized to fit the data. The value of -1 is returned if any values fall into the last histogram bin.

The COORD_ACT_LIFETIME_STDDEV value of a service superclass is unaffected by activities that pass through the service superclass but are remapped to a different superclass before they are completed.

COORD_ACT_EXEC_TIME_AVG DOUBLE coord_act_exec_time_avg - Coordinator activities execution time average monitor element
COORD_ACT_EXEC_TIME_STDDEV DOUBLE Standard deviation of the execution times for coordinator activities at nesting level 0 that were associated with this service superclass since the last reset. Units are milliseconds.

This standard deviation is computed from the coordinator activity executetime histogram and may be inaccurate if the histogram is not correctly sized to fit the data. The value of -1 is returned if any values fall into the last histogram bin.

The execution time standard deviation of a service superclass is unaffected by activities that pass through the superclass but are remapped to a different superclass before they are completed.

COORD_ACT_QUEUE_TIME_AVG DOUBLE coord_act_queue_time_avg - Coordinator activity queue time average monitor element
COORD_ACT_QUEUE_TIME_STDDEV DOUBLE Standard deviation of the queue time for coordinator activities at nesting level 0 that were associated with this service superclass since the last reset. If the COLLECT AGGREGATE ACTIVITY DATA parameter of the service class is set to NONE, the value of the column is null. Units are milliseconds.

This standard deviation is computed from the coordinator activity queuetime histogram and may be inaccurate if the histogram is not correctly sized to fit the data. The value of -1 is returned if any values fall into the last histogram bin.

The queue time standard deviation is counted only toward the service superclass in which the activity was queued.

CONCURRENT_WLO_TOP INTEGER concurrent_wlo_top - Concurrent workload occurrences top monitor element
UOW_TOTAL_TIME_TOP BIGINT uow_total_time_top - UOW total time top monitor element
UOW_THROUGHPUT DOUBLE uow_throughput - Unit of work throughput monitor element

The unit of work throughput since the last reset of the statistics.

UOW_LIFETIME_AVG DOUBLE uow_lifetime_avg - Unit of work lifetime average monitor element
UOW_COMPLETED_TOTAL BIGINT uow_completed_total - Total completed units of work monitor element
TOTAL_CPU_TIME BIGINT total_cpu_time - Total CPU time monitor element
TOTAL_DISP_RUN_QUEUE_TIME BIGINT total_disp_run_queue_time - Total dispatcher run queue time monitor element
ACT_THROUGHPUT DOUBLE act_throughput - Activity throughput monitor element
CPU_UTILIZATION DOUBLE cpu_utilization - CPU utilization monitor element
APP_ACT_COMPLETED_TOTAL BIGINT app_act_completed_total - Total successful external coordinator activities monitor element
APP_ACT_ABORTED_TOTAL BIGINT app_act_aborted_total - Total failed external coordinator activities monitor element
APP_ACT_REJECTED_TOTAL BIGINT app_act_rejected_total - Total rejected external coordinator activities monitor element
MEMBER SMALLINT member - Database member monitor element
ACTIVE_HASH_GRPBYS_TOP BIGINT active_hash_grpbys_top - Active hash Group By operations high watermark
ACTIVE_HASH_JOINS_TOP BIGINT active_hash_joins_top - Active hash joins operations high watermark
ACTIVE_OLAP_FUNCS_TOP BIGINT active_olap_funcs_top - Active OLAP functions operations high watermark
ACTIVE_PEAS_TOP BIGINT active_peas_top - Active partial early aggregations operations high watermark
ACTIVE_PEDS_TOP BIGINT active_peds_top - Active partial early distinct operations high watermark
ACTIVE_SORT_CONSUMERS_TOP BIGINT active_sort_consumers_top - Active sort consumers high watermark
ACTIVE_SORTS_TOP BIGINT active_sorts_top - Active Sorts high watermark
ACTIVE_COL_VECTOR_CONSUMERS_TOP BIGINT active_col_vector_consumers_top - Active columnar_vector consumers high watermark
SORT_CONSUMER_HEAP_TOP BIGINT sort_consumer_heap_top - Individual private sort heap consumer high watermark
SORT_CONSUMER_SHRHEAP_TOP BIGINT sort_consumer_shrheap_top - Individual shared sort heap consumer high watermark
SORT_HEAP_TOP BIGINT sort_heap_top - Sort private heap high watermark
SORT_SHRHEAP_TOP BIGINT sort_shrheap_top - Sort share heap high watermark
RESOURCE_SHARES BIGINT resource_shares - The defined resource shares for this superclass.
RESOURCE_SHARE_TYPE VARCHAR(4) resource_share_type - The resource shares type for this superclass.
RESOURCE_ENTITLEMENT DOUBLE resource_entitlement - The resource shares for this superclass.
EFF_PARALLELISM_TOP BIGINT eff_parallelism_top - The top effective parallelism
EFF_PARALLELISM_AVG DOUBLE eff_parallelism_avg - The average effective parallelism
ACTUAL_PARALLELISM_TOP BIGINT actual_parallelism_top - The actual parallelism peak.
ACTUAL_PARALLELISM_AVG DOUBLE actual_parallelism_avg - The actual parallelism average.
AGENT_LOAD_TRGT_UTILIZATION_TOP DOUBLE agent_load_trgt_utilization_top - The agent load utilization peak.
AGENT_LOAD_TRGT_UTILIZATION_AVG DOUBLE agent_load_trgt_utilization_avg - The agent load utilization average.
CPU_ENTITLEMENT DOUBLE cpu_entitlement - The CPU entitlement percentage.
CPU_SHARE_TYPE VARCHAR(4) cpu_share_type - The CPU share type.
ACT_CPU_TIME_TOP BIGINT act_cpu_time_top - The activity CPU time.
ACT_ROWS_READ_TOP BIGINT act_rows_read_top - The peak number of rows read by activities.
COORD_ACT_EST_COST_AVG DOUBLE coord_act_est_cost_avg - The coordinator activity estimated cost average.
COORD_ACT_EST_COST_STDDEV DOUBLE coord_act_est_cost_stddev - The coordinator activity estimated cost standard deviation.
COORD_ACT_INTERARRIVAL_TIME_AVG DOUBLE coord_act_interarrival_time_avg - The coordinator activity arrival time average.
COORD_ACT_INTERARRIVAL_TIME_STDDEV DOUBLE coord_act_interarrival_time_stddev - The coordinator activity inter-arrival time standard deviation.
COST_ESTIMATE_TOP BIGINT cost_estimate_top - The peak estimated cost of DML activities.
ROWS_RETURNED_TOP BIGINT cost_estimate_top - The peak actual rows returned by DML activities.
TEMP_TABLESPACE_TOP BIGINT temp_tablespace_top - The peak value for temporary table space usage of DML activities.
AGG_TEMP_TABLESPACE_TOP BIGINT agg_temp_tablespace_top - The peak aggregate temporary table space usage of DML activities.
SERVICE_CLASS_ID INTEGER service_class_id - The unique ID of a service superclass.
ACT_TOP BIGINT act_top - The activity peak for the service superclass.
SORT_SHRHEAP_AVG DOUBLE sort_shrheap_avg - The average amount of used sort shared heap
SORT_SHRHEAP_UTILIZATION_AVG DOUBLE sort_shrheap_utilization_avg - The average sort shared heap utilization
SORT_SHRHEAP_UTILIZATION_TOP DOUBLE sort_shrheap_utilization_top - The peak sort shared heap utilization
CONCURRENT_CONNECTION_TOP BIGINT concurrent_connection_top - The peak concurrent connections for this service superclass.
AGENT_LOAD_TRGT_DEMAND_TOP DOUBLE

agent_load_trgt_demand_top - Peak estimated agent load target demand monitor element

AGENT_LOAD_TRGT_DEMAND_AVG DOUBLE

agent_load_trgt_demand_avg - Average estimated agent load target demand monitor element

SORT_SHRHEAP_DEMAND_TOP DOUBLE

sort_shrheap_demand_top - Peak estimated sort memory demand monitor element

SORT_SHRHEAP_DEMAND_AVG DOUBLE

sort_shrheap_demand_avg - Average estimated sort memory demand monitor element

ADM_RUNNING_ACT_LOAD DOUBLE

adm_running_act_load - Load of running activities controlled by adaptive workload management monitor element

ADM_QUEUED_ACT_LOAD DOUBLE

adm_queued_act_load - Load of queued activities controlled by adaptive workload management monitor element

ADM_BYPASSED_ACT_LOAD DOUBLE

adm_bypassed_act_load - Load of activities that bypass the adaptive workload manager monitor element

ADM_RUNNING_ACT_TIME BIGINT

adm_running_act_time - Total time spent running activities controlled by the adaptive workload manager monitor element

ADM_QUEUED_ACT_TIME BIGINT

adm_queued_act_time - Total time spent queued activities controlled by adaptive workload manager monitor element

ADM_BYPASSED_ACT_TIME BIGINT

adm_bypassed_act_time - Total time spent running activities that bypass adaptive workload manager monitor element

act_sort_shrheap_top BIGINT act_sort_shrheap_top - Activity shared sort memory high watermark monitor element
act_estimated_sort_shrheap_top BIGINT act_estimated_sort_shrheap_top - Activity estimated shared sort memory high watermark monitor element

Usage notes

The MON_GET_SERVICE_SUPERCLASS_STATS table function returns one row of data per service superclass and per member. The function does not aggregate data across service superclasses (on a member) or across members (for one or more service superclasses). However, you can use SQL queries to aggregate data, as shown in the previous example.

Examples

Example 1: The following query displays some basic statistics for all the service superclasses on the system, across all database members:
SELECT SUBSTR(SERVICE_SUPERCLASS_NAME, 1, 26) SERVICE_SUPERCLASS_NAME,
       MEMBER,
       LAST_RESET,
       CONCURRENT_CONNECTION_TOP CONCURRENT_CONN_TOP 
FROM TABLE(MON_GET_SERVICE_SUPERCLASS_STATS('', -2)) as SCSTATS

Sample output is as follows:
SERVICE_SUPERCLASS_NAME    MEMBER         ...
-------------------------- -------------- ...
SYSDEFAULTSYSTEMCLASS                   0 ...
SYSDEFAULTMAINTENANCECLASS              0 ...
SYSDEFAULTUSERCLASS                     0 ...
... LAST_RESET                 CONCURRENT_CONN_TOP
... -------------------------- -------------------
... 2006-09-05-09.38.44.396788                   0
... 2006-09-05-09.38.44.396795                   0
... 2006-09-05-09.38.44.396796                   1
Example 2: Because every activity must be mapped to a database service class before being run, you can monitor the global state of the system by using the service class statistics table functions and querying all of the service classes on all members. In the following example, a null value is passed for service_superclass_name to return statistics for all service superclasses, and the value -2 is specified for member to return statistics for all members:
  SELECT SUBSTR(SERVICE_SUPERCLASS_NAME,1,19) AS SUPERCLASS_NAME,       
SUBSTR(CHAR(MEMBER),1,4) AS MEMB,       
CAST(COORD_ACT_LIFETIME_AVG / 1000 AS DECIMAL(9,3))         
AS AVGLIFETIME,       
CAST(COORD_ACT_LIFETIME_STDDEV / 1000 AS DECIMAL(9,3))       
AS STDDEVLIFETIME,       
SUBSTR(CAST(LAST_RESET AS VARCHAR(30)),1,16) AS LAST_RESET  
FROM TABLE(MON_GET_SERVICE_SUPERCLASS_STATS(CAST(NULL AS VARCHAR(128)),       
-2)) AS SCSTATS  ORDER BY SUPERCLASS_NAME, MEMB
The statement returns service superclass statistics such as average activity lifetime and standard deviation in seconds, as shown in the following sample output:
SUPERCLASS_NAME     MEMB AVGLIFETIME STDDEVLIFETIME LAST_RESET      
------------------- ---- ----------- -------------- ----------------
SYSDEFAULTUSERCLASS 0        634.511         22.774 2019-03-08-14.22

Example 3: The same table function can also give the highest value for average concurrency of coordinator activities running in the service superclass on each member:

SELECT SUBSTR(SERVICE_SUPERCLASS_NAME,1,19) AS SUPERCLASS_NAME,       
SUBSTR(CHAR(MEMBER),1,4) AS MEMB,         
CONCURRENT_ACT_TOP AS ACTTOP,         
CONCURRENT_WLO_TOP AS CONNTOP  
FROM TABLE(MON_GET_SERVICE_SUPERCLASS_STATS(CAST(NULL AS VARCHAR(128)),        
-2)) AS SCSTATS  ORDER BY SUPERCLASS_NAME, MEMB
Sample output is as follows:
SUPERCLASS_NAME     MEMB ACTTOP      CONNTOP    
------------------- ---- ----------- -----------
SYSDEFAULTUSERCLASS 0             11           5
SYSDEFAULTUSERCLASS 1              9           6

By checking the average execution times and numbers of activities in the output of this table function, you can get a good high-level view of the load on each member for a specific database. Any significant variations in the high-level gauges returned by this table function might indicate a change in the load on the system.