Neoview Workload Management Services Guide (R2.5)

Considerations
Use the ALTER SERVICE EXEC command to associate execution rules with a service.
You cannot add a rule that begins with the reserved “HPS_” prefix or that has the same
name as one of the predefined rules, HPS_MANAGEABILITY1 through 11 and
HPS_TRANSPORTER1.
Examples
This command adds an execution rule that sets the warning level to high and cancels an
executing query if its used rows are greater than or equal to 10,000 rows:
ADD RULE EXEC EXECRULE1 (USED_ROWS >= 10000, WARN-HIGH, CANCEL);
This command adds an execution rule that sets the warning level to medium if the executing
query's used rows are greater than or equal to 1000 rows:
ADD RULE EXEC EXECRULE2 (USED_ROWS >= 1000, WARN-MEDIUM);
This command adds an execution rule that sets the warning level to low if the executing
query's used rows are greater than the estimated used rows:
ADD RULE EXEC EXECRULE3 (USED_ROWS > EST_USED_ROWS, WARN-LOW);
This command adds an execution rule that cancels an executing query only if both rule
expressions—ACCESSED_ROWS > 500 and ELAPSED_TIME > 15—evaluate to true:
ADD RULE EXEC EXECRULE4 (AND, ACCESSED_ROWS > 500, ELAPSED_TIME > 15, NO-WARN,
CANCEL);
This command adds an execution rule that sets the warning level to high only if all of the
four rule expressions evaluates 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/2010";
This command adds an execution rule that cancels an executing query if either or both of
the rule expressions—USED_ROWS > 20000 and/or ACCESSED_ROWS > 20000—evaluates
to true:
ADD RULE EXEC EXECRULE6 (OR,
USED_ROWS > 20000,
ACCESSED_ROWS > 20000,
WARN-HIGH,
CANCEL) COMMENT "Created by DBA on 5/14/2010";
184 WMS Commands