Neoview Workload Management Services Guide (R2.4)

WARN-HIGH
WARN-MEDIUM
WARN-LOW
NO-WARN
For example, this ADD RULE COMP command defines a compilation rule that sets the warning
level to medium when the compilation rule evaluates to true:
ADD RULE COMP COMPRULE2 (EST_USED_ROWS > 25000, WARN-MEDIUM, HOLD);
If you specify NO-WARN, WMS does not set a warning level or save warning information for
the query when the compilation rule evaluates to true. For example, this ADD RULE COMP
command defines a compilation rule that does not set a warning level when the compilation rule
evaluates to true but instead rejects the query:
ADD RULE COMP COMPRULE5 (OR,
EST_TOTAL_MEMORY > 320000,
EST_CARDINALITY >= 1000000,
EST_ACCESSED_ROWS > 20000,
EST_USED_ROWS > 20000,
SCAN_SIZE > 10000,
CROSS_PRODUCT,
NO-WARN,
REJECT) COMMENT "Created by DBA on 5/14/2009";
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 compilation
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:
ALL EXPRESSIONS = TRUE
If the operator is OR or if there is only one rule expression, running a STATUS QUERIES WARN
command displays the rule expression as the reason for the warning. For more information, see
“Displaying Warning Information” (page 75).
If you do not specify a warning level, the default is WARN-LOW for the compilation rule.
Specifying an Action for the Compilation Rule
You can specify an action to take if the compilation rule evaluates to true. For a compilation rule,
you can specify one of these actions:
REJECT, which rejects the query
HOLD, which puts the query in the holding state
EXEC "sql-string;", which causes the NDCS server to execute an SQL command (or
commands) before executing the query
You must specify one of those actions if you specify NO-WARN for the warning level.
For example, this ADD RULE COMP command defines a compilation rule that rejects the query
when the compilation rule evaluates to true:
ADD RULE COMP COMPRULE5 (OR,
EST_TOTAL_MEMORY > 320000,
EST_CARDINALITY >= 1000000,
EST_ACCESSED_ROWS > 20000,
EST_USED_ROWS > 20000,
SCAN_SIZE > 10000,
CROSS_PRODUCT,
NO-WARN,
REJECT) COMMENT "Created by DBA on 5/14/2009";
Compilation Rules 55