Deactivate a specific Rule in Plan Analyzer
search cancel

Deactivate a specific Rule in Plan Analyzer

book

Article ID: 60519

calendar_today

Updated On:

Products

Plan Analyzer for DB2 for z/OS

Issue/Introduction

A previously defined rule in Plan Analyzer for Db2 for z/OS (PPA) is no longer required and the rule needs to be deactivated. 

 

Environment

Release: r20
Component: Plan Analyzer for Db2 for z/OS

Resolution

This can be accomplished by using Option RS Expert Systems Rule Set Maintenance.

Select the target ruleset with a "U" for update next to the rule set.

          ------ PPA Expert Systems Rule Set Maintenance ----- yyyy/mm/dd hh:mm
COMMAND ===>                                                  SCROLL ===> CSR
                                                              LINE 1 OF 2  >
Rules SSID ===> ssid      Rule Set ===> MY*           Creator ===> *
------------------------------------------------------------------ authid1
                        DB2 SSID ===> ssid          Version ===> 121M500

                                         DB2 O          S +------ LAST UPDATE -
CMD SSID RULE SET DESCRIPTION            RVR D CREATOR  O USER     DATE
_  ____ ________ ______________________ 121 N authid1  U <===== NEW SET CREATION
U  ssid MYRULES  MY EXPERT RULES        121 N authid1  U authid1  yyyy-mm-dd
******************************** BOTTOM OF DATA *********************************


Then use a "Find" for the rule number that is to be deactivated.

Put an "I" (Inactivate) on the Command line next to the rule number.

Rule number 70 shows a "Y" in the ACT column indicating that it is active.

          ----------- PPA Expert Systems Rules List ---------- yyyy/mm/dd hh:mm
COMMAND ===>                                                  SCROLL ===> CSR
                                                         LINE 271 OF 2927
 Rules SSID ===> ssid       Rule Set ===> MYRULES     Creator ===> authid1
 Share Option ===> U       Description ===> MY EXPERT RULES
Notify Userid ===>
----------------------------------------------------------------- authid1
Filter ===> * ( * All, A Act, I Inact, T Thresh, 0 SQL, 1 Phys, 2 Plan, 3 Pred)
                                                  Rule Set DB2R ===> 121M500
C RULE ACT ------------------------  RULE DESCRIPTION  ------------------------

I 0070  Y  This SQL uses the MIN column function on the column &COLUMN of the
           table &TABLE.

           ------- RECOMMENDATION 0075 -------
           Place an index on this column to allow DB2 to obtain the minimum
           value via a Fetch Index scan. A Fetch Index scan will just read the
           first page of the index to obtain the minimum value for this column.

The ACT column to the right of the rule number will change from "Y" to "N".

        ----------- PPA Expert Systems Rules List ---------- yyyy/mm/dd hh:mm
COMMAND ===>                                                  SCROLL ===> CSR
                                                         LINE 271 OF 2927
 Rules SSID ===> ssid       Rule Set ===> MYRULES     Creator ===> authid1
 Share Option ===> U       Description ===> MY EXPERT RULES
Notify Userid ===>
----------------------------------------------------------------- authid1
Filter ===> * ( * All, A Act, I Inact, T Thresh, 0 SQL, 1 Phys, 2 Plan, 3 Pred)
                                                  Rule Set DB2R ===> 121M500
C RULE ACT ------------------------  RULE DESCRIPTION  ------------------------

_ 0070  N  This SQL uses the MIN column function on the column &COLUMN of the
           table &TABLE.

           ------- RECOMMENDATION 0075 -------
           Place an index on this column to allow DB2 to obtain the minimum
           value via a Fetch Index scan. A Fetch Index scan will just read the
           first page of the index to obtain the minimum value for this column.


Then PF3 to save the change.


The rule number has then been deactivated.

Using the "A" line command in the same place as the "I" will activate the rule again. 

 

 

Additional Information

Note:  Manage Rule Sets

The ACTIVATE and INACTIVATE commands used in the command line when updating a ruleset can operate on all the rules at the same time.

The ACTIVATE command activates all of the rules for this Rule Set.  The activation is based on the filter field.  If the filter is an '*' then all rules are activated.

The INACTIVATE command inactivates all of the rules for this Rule Set.  The inactivation is based on the filter field.  If the filter is an '*' then all rules are inactivated.