Skip to content

sys.wlm_pending_rule

This view returns the current list of pending WLM rules (inactive rules) and identifies the JavaScript expression for each rule and other attributes.

Column NameData TypeDescription
profile_nametextName of the profile that the rule is associated with, or (global) if it belongs to all profiles.
rule_namenameName of the rule.
rule_typetextType of rule: prepare, runtime, or completion
orderintegerRule order, expressed as a number. This number represents the order in which rules are applied, with the lowest applied first and the highest applied last.
enabledbooleanWhether the rule is enabled (in use).
superuserbooleanWhether the rule applies to superusers or non-superusers.
expressiontextThe JavaScript expression that defines the conditions and actions for the rule.

For example:

premdb=# select * from sys.wlm_pending_rule where profile_name='shortquery';
 profile_name | rule_name | rule_type | order | enabled | superuser |                                expression                                
--------------+-----------+-----------+-------+---------+---------------------------------------------------------------------------------------
 shortquery   | freeway   | prepare   |   100 | f       | f         | 
 shortquery   | slowlane  | prepare   |   100 | t       | t         |  if (w.referencedTables.contains('match')) {w.maximumRowLimit = 1000000;}
(2 rows)

Parent topic:System Views