Example: Filtering to Reject Queries with a Final Row Count of More than a Specified Number - Teradata Viewpoint - Teradata Workload Management

Teradata® Viewpoint User Guide

Product
Teradata Viewpoint
Teradata Workload Management
Release Number
17.10
Published
February 2022
Language
English (United States)
Last Update
2022-06-28
dita:mapPath
lks1628075605455.ditamap
dita:ditavalPath
tky1501004671670.ditaval
dita:id
B035-2206
lifecycle
previous
Product Category
Analytical Ecosystem
Suppose you want to protect your system from bad queries by preventing the execution of queries that have an estimated final row count of over one billion rows.
  1. Select a ruleset to edit.
    1. Open the Workload Designer portlet and the Workload Designer view.
    2. From the For System list, select PROD1.
    3. In the local Working section, click the ruleset name, BadQueries.
  2. Create a filter.
    1. From the ruleset toolbar, click Filters.
    2. Next to Filters, click .
    3. Enter the name of the filter, in this case Final Rows Over 1000000000.
    4. Click Save.
  3. Add classification criteria for the filter to apply to queries that return an estimated one billion rows or more.
    1. Click the Classification tab.
    2. From the Add Classification Criteria list, select Query Characteristics.
    3. Click Add.
      The Edit Query Characteristics Criteria dialog box appears.
    4. Select the Estimated Final Row Count check box.
    5. Select the Row Count ≥ check box, and enter 1000000000 in the field.
    6. Select the Join Type check box.
    7. From the Include Only list, select Unconstrained Product Join.
    8. Click OK.
    9. Click Save.
  4. Activate the ruleset.
    1. Go back to the Workload Designer view.
    2. For the BadQueries ruleset, click and select Make Active.
  5. [Optional] Review the queries rejected according to the criteria you specified.
    1. Open the Workload Monitor portlet.
    2. Click "" in the portlet frame and select Settings.
    3. Click the Systems tab.
    4. From the Systems list, select PROD1.
    5. Click OK.
    6. In the Dynamic Pipes View, click on the number under the request status icon for system filters.

    7. Review the summary table to identify the queries rejected by this filter.
      The Reason column includes For Rule Name 'Final Rows Over 1000000000'.