16.00 - Set Query Logging Tab - Teradata Studio

Teradata Studio User Guide

prodname
Teradata Studio
vrm_release
16.00
created_date
March 2017
category
User Guide
featnum
B035-2041-126K

The Set Query Logging tab contains the following fields.

Rule Type

Option Description
Application Name Creates a rule by application name. Type the application name in the text box located directly below the check box. You can also enter single or multiple application names by separating names with a comma (,). This check box is only available when connected to Teradata Database 13.00.00 and later.
All Users Creates a query logging rule that applies to all users. Type one or more Account names, separated by commas. All users are restricted to logging on to only those sessions for the specified accounts.
Specific User(s) Selects users from the list of all users in the database to create a query logging rule for one or more users. Type one or more Account names, separated by commas. All users are restricted to logging on to only those sessions for the specified accounts.

Mode Option

Option Description
Mode Controls which CPU/IO collection algorithm Teradata Database uses for this query logging rule.

What to Log

Option Description
No Logging Exempts one or more users from logging when these users would otherwise be logged by a broader rule such as All Users or Account. This check box is only available when connected to Teradata Database 13.00.00 and later.
Object Names References the names of the database objects (Tables, Views, and so forth.) in the query to be saved to the DBQLObjTbl table.
Full SQL Text Saves the full SQL text to the DBQLSQLTbl table (besides what is specified in the SQL Length field).
Step Information Logs the statistics for each execution step within the queries to the DBQLStepTbl table.
Explain Text Saves the Explain text for the queries to the DBQLExplainTbl table.
Usercount Logs the user count for queries.
XML Plan Adds XML Plan information to the Query Log for later use by the DBQAT products. Select the Verbose option if you want detailed information entered in the log.
Statistics Usage Logs query statistics. If you want to log detailed statistics, select Detail.
Lock Logs information about query locks.
Everything Logs all possible options.

Limits

Option Description
SQL Length Limits the length of the SQL stored in the main query logging table: DBQLLogTbl. The maximum length is 10,000 characters. If you do not select this option, the Teradata Database logs the first 200 characters of the SQL.
Summary Logs only summary statistics for the executed queries. Enter 3 threshold values. These values define thresholds (seconds) for query response time. They are used to group queries into 4 'size' categories.

A count of the number of queries in each category is logged every 10 minutes. For example: If the three threshold values entered are 5, 10 and 15, counts for the queries that run between 0 and 5 seconds, 5 to 10 seconds, 10 to 15 seconds and above 15 are logged.

Every 10 minutes, a DBQL object row is written for any count that is greater than 0. For example, if 1 query ran under 5 seconds, 2 queries each ran 7 seconds, and 3 queries each ran over 15 seconds, 3 rows are written to the DBQL object table. When you select Summary, none of the other dialog options apply.

Threshold Counts those queries that run in less than n seconds (in the summary record written every 10 minutes). Queries that run longer than n seconds are logged using the other settings.
  • Elapsed (sec)
  • Elapsed (1/100)
  • CPU Time
  • CPU (Normalized)
  • I/O Count
Specifies the content of the Summary and Threshold fields. Elapsed (sec) is the default.