Example of ordering by activity name: ORDER (ACTNAME)
This example shows how to order an Accounting report by activity name.
If you want to use ORDER (ACTNAME), you should consider the following:
- ACTNAME cannot be combined with other OMEGAMON for Db2 Performance Expert identifiers in the ORDER subcommand.
- ORDER (ACTNAME) is only allowed for reports that are created from
input trace specified with
//INPUTDD
. - If you use the RESTORE subcommand, you cannot order by activity name in the subsequent REPORT subcommands.
The following command orders an Accounting report by activity name.
⋮
ACCOUNTING
REPORT
ORDER (ACTNAME)
⋮
To identify the real number of stored procedures (SP) or user-defined functions (UDF) instead of the number of packages used, you must include the trace collection of IFCID 233 (Start/Stop for each SP or UDF), 380 (Start/Stop for SP), or 381 (Start/Stop for UDF) in your input trace data. Stored procedures and user-defined functions are determined and can be counted if IFCID 233, 380, or 381 is found. Subprograms called by these routines and functions are not taken into account for the number of occurrences.
Note: If there is neither IFCID 233, 380, nor 381 for each
SP or UDF, all packages of the same activity type and activity name
are counted as separate occurrences. To calculate the average value,
the sum is divided by the number of:
- Occurrences (prior to DB2 10).
- Threads to roll data into this QPAC data section (DB2 10 or later).
Sample workload with two different SPs and subprograms
Table 1 shows a workload of six threads with stored procedures
(SP) and subprograms. In this sample workload IFCID 233 is written
for each SP execution. Package SP-A has the activity name ACTNAME-A.
Package SP-B has the activity name ACTNAME-B. Packages PKG1, PKG2,
or PKG3 are linked by SP-A or SP-B that is why they inherit their
activity names.
Six threads (plans) | with SP and subprograms | DB2 Trace records (3, 239) written | SP START/STOP IFCID 233 | ||||
---|---|---|---|---|---|---|---|
Plan A | SP-A
|
(3) Plan A | (239) SP-A | (239) PKG1 | (239) PKG2 | (233) Start | (233) Stop |
Plan A | SP-A
|
(3) Plan A | (239) SP-A | (239) PKG1 | (233) Start | (233) Stop | |
Plan B | SP-B | (3) Plan B | (239) SP-B | (233) Start | (233) Stop | ||
Plan A | SP-A
|
(3) Plan A | (239) SP-A | (239) PKG2 | (239) PKG1 | (233) Start | (233) Stop |
Plan B | SP-B
|
(3) Plan B | (239) SP-B | (239) PKG1 | (233) Start | (233) Stop | |
Plan A | SP-A
|
(3) Plan A | (239) SP-A | (239) PKG2 | (239) PKG3 | (233) Start | (233) Stop |