Capturing the DBQL Query Log - Teradata Workload Analyzer

Teradata Workload Analyzer User Guide

Product
Teradata Workload Analyzer
Release Number
17.00
Published
September 2019
Language
English (United States)
Restricted Access
TTU-17.00-EAP
Last Update
2019-06-07
dita:mapPath
vjd1544831946946.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2514
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 Teradata Vantage™ SQL Data Definition Language Syntax and Examples, B035-1144 and Teradata Vantage™ - 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.