Grouping data by ordering according to thread types

You can use the GROUP command to order data according to thread types.

The following example first defines the group, such as GROUP (THREADTYPE(THRTGRP(*))). Then the REDUCE subcommand is specified to reduce the usage of the group to report (ordered by the thread type) and save:



⋮
GROUP (THREADTYPE(THRTGRP(*)))
ACCOUNTING
  REDUCE
    INCLUDE (THREADTYPE (G(THRTGRP)))
  REPORT
    ORDER(THREADTYPE)
  SAVE
    DDNAME(ACSAVDD1)
⋮


Sample with GROUP REDUCE for THREADTYPE

The following example shows the part of a sample Accounting report that results from the command GROUP REDUCE ordered by THREADTYPE.



   LOCATION: DEBDZ99NM222DSNY         OMEGAMON XE FOR DB2 PERFORMANCE EXPERT (V5R4M0)                     PAGE: 1-1
      GROUP: N/P                                 ACCOUNTING REPORT - LONG                       REQUESTED FROM: NOT SPECIFIED
     MEMBER: N/P                                                                                            TO: NOT SPECIFIED
  SUBSYSTEM: DSNY                                     ORDER: THRDTYPE                            INTERVAL FROM: 11/26/15 23:00:49.00
DB2 VERSION: V10                                      SCOPE: MEMBER                                         TO: 11/27/15 22:59:55.00

THRDTYPE: THRTGRP

ELAPSED TIME DISTRIBUTION                                           CLASS 2 TIME DISTRIBUTION
----------------------------------------------------------------    ----------------------------------------------------------------
APPL   |==================================================> 100%    CPU    |===> 6%
DB2    |                                                            SECPU  |=====> 11%
SUSP   |                                                            NOTACC |======> 12%
                                                                    SUSP   |===================================> 71%

AVERAGE       APPL(CL.1)  DB2 (CL.2)  IFI (CL.5)    CLASS 3 SUSPENSIONS   AVERAGE TIME  AV.EVENT    HIGHLIGHTS
------------  ----------  ----------  ----------    --------------------  ------------  --------    --------------------------
ELAPSED TIME   52.522821    0.022607         N/P    LOCK/LATCH(DB2+IRLM)      0.003379      0.07    #OCCURRENCES    :     3967
 NONNESTED     52.522821    0.022607         N/A     IRLM LOCK+LATCH               N/A       N/A    #ALLIEDS        :     3587
 STORED PROC    0.000000    0.000000         N/A     DB2 LATCH                     N/A       N/A    #ALLIEDS DISTRIB:        0
 UDF            0.000000    0.000000         N/A    SYNCHRON. I/O             0.005358      0.88    #DBATS          :      380
 TRIGGER        0.000000    0.000000         N/A     DATABASE I/O             0.002200      0.46    #DBATS DISTRIB. :        0
                                                     LOG WRITE I/O            0.003158      0.42    #NO PROGRAM DATA:        0
⋮


Note: The number of ALLIED, ALLIED DISTRIBUTED, DBAT, and DBAT DISTRIBUTED threads are presented in the Highlights block.