Skip to content

sys.query_rule_event

This view captures information about WLM rule processing (as also displayed via the SMC). A single row identifies a unique rule-processing event for a specific query. Use this view to see which rules and related actions are in effect when specific queries are run.

Column NameData TypeDescription
query_idbigintQuery ID, which can be joined with the query_id column in sys.log_query or sys.snap_query.
rule_nametextName of the WLM rule being applied. The default value of rule appears in this column for begin and end event types.
event_timetimestamptzWhen each event occurred.
event_typetextPossible values for each event are begin, disabled, end, ignore, info, and set.
eventtextRule processing events include Rule processing starting, Rule processing complete, and Setting...

Examples

premdb=> select * from sys.query_rule_event;
 query_id |      rule_name      |         event_time         | event_type |                 event                  
----------+---------------------+----------------------------+------------+----------------------------------------
   30108 | rule                | 2017-04-11 15:17:15.584-07 | end        | Rule processing for 30108 complete
   30108 | sys_defaultRowLimit | 2017-04-11 15:17:15.582-07 | set        | Setting MaximumRowLimit to 5000000
   30108 | fastlane            | 2017-04-11 15:17:15.581-07 | set        | Setting ResourcePool to shortquerypool
   30108 | rule                | 2017-04-11 15:17:15.578-07 | begin      | Rule processing for 30108 starting
...
premdb=> select s1.query_id, s1.query_text, s2.rule_name, s2.event_type, s2.event 
from sys.log_query s1, sys.query_rule_event s2 
where s1.query_id=s2.query_id and query_text ='select * from match;';
 query_id |       query_text       |      rule_name      | event_type |                 event                  
----------+------------------------+---------------------+------------+----------------------------------------
   33658 |  select * from match;  | rule                | end        | Rule processing for 33658 complete
   33658 |  select * from match;  | sys_defaultRowLimit | set        | Setting MaximumRowLimit to 5000000
   33658 |  select * from match;  | fastlane            | set        | Setting ResourcePool to shortquerypool
   33658 |  select * from match;  | rule                | begin      | Rule processing for 33658 starting
(4 rows)

Parent topic:System Views