Neoview Workload Management Services Guide (R2.4)

Execution Rules
Execution rules, which are applied after a query has been executing for at least five minutes,
determine whether to permit the query to continue executing based on the query runtime statistics.
This section covers:
“How WMS Evaluates Execution Rules” (page 59)
Adding an Execution Rule” (page 61)
“Displaying the Definition of an Execution Rule” (page 63)
“Displaying the Definitions of All Execution Rules” (page 63)
Altering an Execution Rule” (page 64)
“Deleting an Execution Rule” (page 64)
Associating Execution Rules With a Service” (page 64)
“Displaying the Execution Rules Associated With a Service” (page 64)
“Displaying the Services Associated With an Execution Rule” (page 65)
How WMS Evaluates Execution Rules
When a query has been executing for at least five minutes, WMS starts periodically checking the
execution rules set for the service and comparing them with the query runtime statistics from
the Runtime Manageability Services (RMS) to determine whether the query can continue executing.
The interval at which WMS checks the execution rules is determined by the RULE_INTERVAL
threshold. For more information, see “Configuring the WMS System Configuration” (page 28).
The following example illustrates how WMS evaluates the execution rules against the query
runtime statistics.
Suppose you defined these execution rules for the service that is associated with the executing
query:
ADD RULE EXEC EXECRULE1 (USED_ROWS >= 10000, WARN-HIGH, CANCEL);
ADD RULE EXEC EXECRULE2 (USED_ROWS >= 1000, WARN-MEDIUM);
ADD RULE EXEC EXECRULE3 (USED_ROWS > EST_USED_ROWS, WARN-LOW);
ALTER SERVICE SERVICE1 EXEC (EXECRULE1, EXECRULE2, EXECRULE3);
WMS evaluates each execution rule in the order in which you have associated the execution rules
with the service in the ALTER SERVICE EXEC command. WMS evaluates the first execution
rule associated with the service by comparing each execution rule expression with the
corresponding query runtime statistic from RMS. In this case, EXECRULE1 has only one execution
rule expression, which requires the used rows to be greater than or equal to 10,000:
USED_ROWS >= 10000
Because the actual used rows, 1567, does not meet the criterion of the execution rule expression,
WMS considers the execution rule, EXECRULE1, to be false. See Figure 4-5 (page 60).
Execution Rules 59