Filter collection data to collect data for only one PLAN.
search cancel

Filter collection data to collect data for only one PLAN.

book

Article ID: 394118

calendar_today

Updated On:

Products

Detector for DB2 for z/OS

Issue/Introduction

Detector collection data can be filtered using the Include/Exclude List Entries.

Normally, a variety of activity is collected in order to represent the majority of activity during an interval.

How can the Include/Exclude List Entries be set such that activity from only one PLAN is be collected in an interval. 

Environment

DB2 for Z/OS

Release : R20

Resolution

See this section in Limit Collection Activity:

To limit your collection activity, add the appropriate filters to your Detector collection profile. You can then use these filters when you start the collection. If you start the collection through the product panels, specify your profile name and Plan Excl/Incl List=Y on the Start Collection Display. If you start the collection by using the START(DTR) command, specify the profile name and PLNX(Y) in the command.

Add two filter lines.

The first one to INCLUDE the data for the targeted plan.

The second one to EXCLUDE data for all other PLANS. 

          ------ View/Modify Include/Exclude List Entries ------ yy/mm/dd hh:mm
Command ==>                                                     Scroll ==> CSR
                                                                    LINE 1 OF 2
Profile ID   ==> authid
Profile SSID ==> ssid
Add Entry    ==> s <<<<---------------------------------------select this field to add a new entry!!!

-------------------------------------------------------------------------------

S -View Entry    U -Update Entry    D -Delete Entry

A LOCATION         PLAN     CORRID       AUTHID   CONNTYPE ACT DYN KEY TBL DTB
- ---------------- -------- ------------ -------- -------- --- --- --- --- ---
_ %                TESTPLN1 %            %        %         Y   Y   Y   Y   Y <<<<<----------------Y means to include (See How Collection Filters are Applied)
_ %                %        %            %        %         N   N   N   N   N <<<<<----------------N means to exclude
******************************* BOTTOM OF DATA ********************************


This screen appears when add Entry is used. Adding this line excludes all other data.
 
     --------------- Add Include/Exclude Entry --------------- yy/mm/dd hh:mm
Command ==>

Profile ID         ==> authid
Profile SSID       ==> ssid

-------------------------------------------------------------------------------

SQL activity selection criteria:

Location Name    ==> %
Planname         ==> %
Correlation ID   ==> % (Case sensitive)
Authid           ==> %
  Connection Types ==> S TSO          S Batch        S CICS
                       S DL/I Batch   S IMS          S Distributed

Include selected SQL activity in:

Detector Statistics Collection                      ==> N
Dynamic SQL Statistics Collection                   ==> N
Additional Keys Statistics Collection               ==> N
Standard Activity Table/Index Statistics Collection ==> N
Dynamic SQL Table/Index Statistics Collection       ==> N

The "%" signs above are wildcards which indicate ALL of that type of column data. 

There would not be any performance impact (contention issues) of using this filter since the data is simply filtered and not stored as it is coming into Detector. The work has already been done to capture the data. You just decide not to store most of it. 

After the filter is applied the report below shows TIMEPCT and CPUPCT shown 100%, is that correct?

 

DB2 SSID  ==> ssid                                                             
View Type ==> A * -Activity X -Exception E -Error O -Object  View History ==> _
View By   ==> P * -Plan G -Prog S -SQL Q -DSQL F -Prof K -Key   Total/Avg ==> T
                                                                               
Interval Time ==> 01:00                           Interval Elapsed ==> 01:50.89
-------------------------------------------------------------------------------
                                                                               
S -Programs, D -Detail, Q -Dynamic SQL, K -Keys, H -History, T -Active Threads 
                                                                               
  PLANNAME COMMIT   ABORT  SQL        TIMEPCT CPUPCT  INDB2_TIME   INDB2_CPU   
  -------- -------- ------ ---------- ------- ------- ------------ ------------
_ TESTPLN1        0      0          4 100.00% 100.00% 00:00.000449 00:00.000448
******************************* BOTTOM OF DATA ********************************

 

Since we are ONLY collecting one plan in the whole interval due to the filter, these values do represent the percentage of the total interval. 

Normally one plan would not be collected and so the values would then be based on all the activity collected in the interval not just one plan. In this case these two columns lose their benefit as only one plan is collected. 

Additional Information