Neoview Workload Management Services Guide (R2.5)
Execution Rules
Execution rules, which are applied after a query has been executing for a configured interval (by
default, 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 98)
• “Display the Execution Rules Summary” (page 100)
• “Add an Execution Rule” (page 101)
• “Alter an Execution Rule” (page 108)
• “Delete an Execution Rule” (page 110)
• “Associate Execution Rules With a Service” (page 111)
How WMS Evaluates Execution Rules
When a query has been executing for a configured interval (by default, 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 when WMS starts checking the execution rules is
determined by the RULE_INTERVAL_QUERY_EXEC_TIME threshold. The frequency at which
WMS checks the execution rules is determined by the RULE_INTERVAL threshold. For more
information, see “Configure the WMS System” (page 50). The following example illustrates how
WMS evaluates the execution rules against the query runtime statistics.
NOTE: When query statistics aggregation is enabled for a service, the execution rules are applied
to the aggregated statistics rather than the individual query 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 5-5 (page 99).
98 Configuring Rules