Query Logging Fields and Controls - Teradata Administrator

Teradata Administrator User Guide

Teradata Administrator
Release Number
English (United States)
Last Update
Product Category
Teradata Tools and Utilities

Query Logging Fields and Controls


Table 33: Query Logging Rules Dialog Box Description 

Field or Control


By Application Name

As an alternative to creating a rule by User(s) or Account(s), select to create a rule by Application Name, and then type the application name in the text box located directly below this check box.

Note: This check box is only available when connected to Teradata Database 13.00.00 and later.


Lists of all the Users on the database. Select the user(s) to create a query logging rule.


Select to create an access rule that applies to all users.


Enter an Account, or a list of accounts separated by commas, to restrict logging to only those sessions for which the selected user logs on with one of the specified accounts.

Note: If an account is entered, select only one user.

What to Log

No Logging

Select for user(s) to be exempt from logging when these user(s) would otherwise be logged by a broader rule such as All Users or Account.

Note: This check box is only available when connected to Teradata Database 13.00.00 and later.

Object Names

Select to reference the names of the database objects (Tables, Views, and so forth.) in the query to be saved to the DBQLObjTbl table.

Full SQL Text

Select to save the full SQL text to the DBQLSQLTbl table (besides whatever is specified in the SQL Length field).

Step Information

Select to save the statistics for each execution step within the queries to the DBQLStepTbl table.

Explain Text

Select to save the Explain text for the queries to the DBQLExplainTbl table.

XML Plan

Adds XML Plan information to the Query Log for later use by the DBQAT products.


Logs all possible options.


SQL Length

Limits the length of the SQL stored in the main query logging table: DBQLLogTbl. (The maximum length is 10,000 characters.)

Note: If this option is not selected, the Teradata Database logs the first 200 characters of the SQL.


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 is 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 ran 7 seconds each and 3 queries each ran over 15 seconds, 3 rows is written to the DBQL object table.

Note: When Summary is selected, none of the other dialog box options apply.


Select to count 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), and I/O Count option buttons

These options specify the content of the Summary and Threshold fields. Elapsed (sec) is the default.

Begin Log

Click Begin to start Query Logging for the selected user.

Note: In Teradata Database version 13.10 and later you do not need to use the End Log command before issuing a new Begin Log command for the same criteria.

End Log

Click End to stop Query Logging for the selected user.


Click Display to view the Query Logging rules for the selected user.


Click Delete to delete all existing rule(s) for the selected user.

Select the All check box, and then click Delete to delete all existing rule(s) for all users. The All check box is only available when the By Application Id check box is not selected.

Note: The Delete button is only available when connected to Teradata Database 13.00.00 and later.