Suppose you want to protect your system from bad queries by preventing queries that take five minutes or more to complete.
- Select a ruleset to edit.
- Open the Workload Designer portlet and the Workload Designer view.
- From the For System list, select PROD1.
- In the local Working section, click the ruleset name, BadQueries.
- Create a filter.
- From the ruleset toolbar, click Filters.
- Next to Filters, click .
- Enter the name of the filter, in this case Processing Time Over 5 min.
- Click Save.
- Add classification criteria for the filter to apply to queries that are estimated to take five minutes or more to complete.
- Click the Classification tab.
- From the Add Classification Criteria list, select Query Characteristics.
- Click Add.The Edit Query Characteristics Criteria dialog box appears.
- Select the Estimated Total Processing Time check box.
- Select the Processing Time ≥ check box and enter 300 in the field.
- Click OK.
- Click Save.
- Activate the ruleset.
- Go back to the Workload Designer view.
- For the BadQueries ruleset, click and select Make Active.
- [Optional] Review the queries rejected according to the criteria you specified.
- Open the Workload Monitor portlet.
- Click in the portlet frame and select Settings.
- Click the Systems tab.
- From the Systems list, select PROD1.
- Click OK.
- In the Dynamic Pipes View, click on the number under the request status icon for system filters.
- Review the summary table to identify the queries rejected by this filter.The Reason column includes For Rule Name 'Processing Time Over 5 min'.