Capturing the DBQL Query Log - Teradata Workload Analyzer

Teradata Workload Analyzer User Guide

Product
Teradata Workload Analyzer
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-10-13
dita:mapPath
awa1488824663126.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2514
lifecycle
previous
Product Category
Teradata Tools and Utilities
Use this second method if your site uses the default priority scheduler settings. This method requires logging query activity to DBQL for the period of time that represents a typical workload (for example, one week).
Skip this procedure if DBQL data is already collected for your workloads.

Teradata WA analyzes both the DBQL detail and summary tables. The detail table contains one row for each query submitted. The summary table is more efficient: it is updated at periodic intervals with a count of the number of queries submitted by each user account.

For assistance with DBQL syntax and usage, see SQL Data Definition Language (B035-1144) and Database Administration (B035-1093).

  • To enable detail logging, enter one of these commands at a command console:
    BEGIN QUERY LOGGING ON USER1, USER2, USER3;
    BEGIN QUERY LOGGING ON ACCOUNT = (‘ACCT1’, ‘ACCT2’, ‘ACCT3’);
  • To enable summary logging, enter one of these commands:
    BEGIN QUERY LOGGING LIMIT THRESHOLD = 3600 ON USER1, USER2;
    BEGIN QUERY LOGGING LIMIT THRESHOLD = 3600 ON ACCOUNT = (‘ACCT1’);
  • To disable detail or summary logging, use one of these commands:
    END QUERY LOGGING ON USER1, USER2, USER3;
    END QUERY LOGGING ON ACCOUNT = (‘ACCT1’, ‘ACCT2’, ‘ACCT3’);
  • TWA also uses data from the DBQL Step Table, if available, for analysis on estimated processing time. The syntax for step data looks something like this:
    BEGIN QUERY LOGGING WITH STEPINFO ON USER1;
    This turns on both detail and step logging for “user1”. There is no syntax for turning on only stepinfo.