Neoview Workload Management Services Guide (R2.4)
sets the warning level to high and cancels the query if the USED_ROWS expression, highlighted
in boldface, evaluates to true:
ADD RULE EXEC EXECRULE1 (USED_ROWS >= 10000,
WARN-HIGH, CANCEL);
The USED_ROWS expression evaluates to true when the number of rows returned to the query
is greater than or equal to 10,000.
If the rule that has more than one expression, the operator, AND or OR, determines whether all
the expressions or a single expression in the rule must be true for the rule to trigger a warning
level or an action.
If the operator is AND, all expressions in the rule must be true for the rule to be considered true
and trigger a warning level or an action. For example, this ADD RULE EXEC command defines
an execution rule that is considered true only when all four execution rule expressions, highlighted
in boldface, evaluate to true:
ADD RULE EXEC EXECRULE5 (AND,
ELAPSED_TIME > 5,
ELAPSED_TIME <= 15,
TOTAL_MEM_ALLOC > 32,
TOTAL_MEM_ALLOC < 64,
WARN-HIGH) COMMENT "Created by DBA on 5/14/2009";
If the operator is OR, only one of the expressions in the rule must be true for the rule to be
considered true and trigger a warning level or an action. For example, this ADD RULE EXEC
command defines an execution rule that is considered true when at least one of the two execution
rule expressions, highlighted in boldface, evaluates to true:
ADD RULE EXEC EXECRULE6 (OR,
USED_ROWS > 20000,
ACCESSED_ROWS > 20000,
WARN-HIGH,
CANCEL) COMMENT "Created by DBA on 5/14/2009";
If you do not specify an operator, AND is the default operator.
Specifying a Warning Level for the Execution Rule
You can specify a warning level for the execution rule, so WMS sets a warning level and saves
warning information for the query when the execution rule evaluates to true. Choose one of
these warning levels from highest to lowest severity:
• WARN-HIGH
• WARN-MEDIUM
• WARN-LOW
• NO-WARN
For example, this ADD RULE EXEC command defines an execution rule that sets the warning
level to medium when the execution rule evaluates to true:
ADD RULE EXEC EXECRULE2 (USED_ROWS >= 1000, WARN-MEDIUM);
If you specify NO-WARN, WMS does not set a warning level or save warning information for
the query when the execution rule evaluates to true. For example, this ADD RULE EXEC command
defines an execution rule that does not set a warning level when the execution rule evaluates to
true but instead cancels the query:
ADD RULE EXEC EXECRULE4 (AND, ACCESSED_ROWS > 500, ELAPSED_TIME > 15, NO-WARN, CANCEL);
If you specify NO-WARN, you must specify a rule action. For more information, see “Specifying
an Action for the Compilation Rule” (page 55).
If you specify a warning level other than NO-WARN, WMS sets the warning level (high, medium,
or low) for the query and saves warning information in its shared memory when the execution
rule evaluates to true. If the operator is AND and there is more than one rule expression, running
a STATUS QUERIES WARN command reveals the following reason for the warning:
62 Configuring Rules