Neoview Workload Management Services Guide (R2.4)
• “Adding a Compilation Rule” (page 53)
• “Associating Compilation Rules With a Service” (page 57)
Adding a Compilation Rule
Use the ADD RULE COMP command to define a compilation rule in WMS. For example, this
ADD RULE COMP command defines the compilation rule, COMPRULE1, setting the warning
level to high and the rule action to REJECT if estimated rows used is greater than 50,000:
NS%ADD RULE COMP COMPRULE1 (EST_USED_ROWS > 50000, WARN-HIGH, REJECT);
--- WMS operation complete.
NS%
Here are some things to consider when defining compilation rules:
• “Specifying the Compilation Rule Expressions” (page 53)
• “Specifying the AND or OR Operator” (page 54)
• “Specifying a Warning Level for the Compilation Rule” (page 54)
• “Specifying an Action for the Compilation Rule” (page 55)
• “Adding a Comment for the Compilation Rule” (page 56)
For the syntax, see the “ADD RULE COMP Command” (page 83).
Specifying the Compilation Rule Expressions
You can specify one to fifteen expressions in a compilation rule to define the conditions that must
be met for the compilation rule to trigger a warning level or an action. In each expression, you
can set a condition for one of these compiler estimates:
Table 4-2 Compiler Estimates for Compilation Rule Expressions
Name in a Compilation Rule ExpressionName in STATUS QUERIES or STATUS
QUERY Output
Compiler Estimate
EST_TOTAL_MEMORY (in kilobytes)EST_TOTAL_MEM (in kilobytes)Estimated total memory per CPU
EST_TOTAL_TIME (in minutes)EST_COST or EST_TOTAL_TIME (in
seconds)
Estimated time to execute the query
EST_CARDINALITYEST_CARDINALITYEstimated number of rows that the
query will return
EST_ACCESSED_ROWSCMP_DP2_ROWS_ACCESSEDEstimated number of rows that will
be accessed by all the scan, insert,
update, and delete operators
EST_USED_ROWSCMP_DP2_ROWS_USEDEstimated number of rows that will
be accessed by scan and insert
operators
NUM_JOINSCMP_NUM_JOINSNumber of joins in the query plan
SCAN_SIZECMP_ROWS_ACCESSED_FULL_SCAN
(if CMP_FULL_SCAN_ON_TABLE
is set)
Estimated number of rows that will
be accessed by a full scan of a table
UPDATE_STATS_WARNINGCMP_MISSING_STATSMissing statistics for a single-column
group
CROSS_PRODUCTCMP_MANDATORY_X_PRODJoin without a predicate
Each expression must be separated by a comma in the ADD RULE COMP command. For example,
this ADD RULE COMP command defines a compilation rule that has three compilation rule
expressions, highlighted in boldface:
Compilation Rules 53