15.00 - 15.10 - Database Query Log - Teradata Database

Teradata Database Introduction to Teradata

Product
Teradata Database
Release Number
15.00
15.10
Content Type
User Guide
Publication ID
B035-1091-151K
Language
English (United States)
Last Update
2018-09-25

The Database Query Log (DBQL) is a Teradata Database feature that provides a series of predefined tables that can store historical records of queries and their duration, performance, and target activity based on rules you specify.

DBQL is flexible enough to log information on the variety of SQL requests that run on Teradata Database, from short transactions to longer-running analysis and mining queries.

You can request that DBQL log particular query information or just a count of qualified queries. You can specify a hierarchy of rules that DBQL applies to sessions. This allows great flexibility in capturing the right amount of logging data for each use of the Teradata Database system. The rules may target:

  • Application names, for example FastLoad or MultiLoad
  • A user and a specific account
  • A user and all accounts
  • All users and a specific account
  • All users and all accounts
  • Each rule may specify that the recording criteria be a mix of:

  • Summarizing data based on elapsed time, CPU time, or I/O counts as either a series of intervals or a threshold limit
  • Reporting details at the request level, including identification, performance, counts, error code, and SQL text
  • Additional, optional detailed data, which may include any or all:
  • Objects used in the request
  • Steps and performance data per step
  • Full SQL text
  • Explain text
  • Optimizer query plan information logged as an XML document
  • You can define rules, for instance, that tell the DBS to log the first 4,000 SQL characters of a query that runs during a session invoked by a specific user under a specific account if the query exceeds a specified time threshold.

    To implement DBQL, you use simple SQL requests to control the starting and ending of the logging activity. These rules may be dynamically changed as needed to support management of the Teradata Database system.