sys.wlm_pending_rule

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

Column Name Data Type Description
profile_name text Name of the profile that the rule is associated with, or (global) if it belongs to all profiles.
rule_name name Name of the rule.
rule_type text Type of rule: submit, assemble, compile, restart_for_error, restart_for_user, runtime, or completion
order integer Rule 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.
enabled boolean Whether the rule is enabled (in use).
superuser boolean Whether the rule applies to superusers or non-superusers.
expression text The JavaScript expression that defines the conditions and actions for the rule.
For example:
yellowbrick=# select * from sys.wlm_pending_rule where profile_name='shortquerybias';
  profile_name  |     rule_name     |    rule_type     | order | enabled | superuser |                             expression                              
----------------+-------------------+------------------+-------+---------+-----------+---------------------------------------------------------------------
 shortquerybias | fastlane          | compile          |   100 | t       | f         |  if (w.database === 'premdb') { w.resourcePool = 'shortquerypool';}
 shortquerybias | log_premdb        | submit           |   100 | t       | f         |  if (w.database === 'premdb') {log.info('premdb query executed');}
 shortquerybias | limit_concurrency | submit           |     1 | t       | f         | if (w.user === 'sqb') {                                            +
                |                   |                  |       |         |           |         wlm.throttle(2, w.application);                            +
                |                   |                  |       |         |           | }
 shortquerybias | assemble_rule     | assemble         |     1 | t       | f         | if ((String(w.SQLText).indexOf('newmatchstats') >= 0)) {           +
                |                   |                  |       |         |           |         w.maximumExecTimeLimit = 3;                                +
                |                   |                  |       |         |           | }
 shortquerybias | restart_admin     | restart_for_user |     1 | t       | f         | if (w.application === 'ybsql') {                                   +
                |                   |                  |       |         |           |         w.statsStored = true;                                      +
                |                   |                  |       |         |           | }
(5 rows)