Database Query Log - Teradata Vantage - Analytics Database

Database Introduction

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-09-27
dita:mapPath
gtm1628096154303.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
dsm1472253642401
lifecycle
latest
Product Category
Teradata Vantageā„¢

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

You can request that DBQL log particular query information or only a count of qualified queries. You can specify a hierarchy of rules that DBQL applies to sessions. The rules may target the following:
  • 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 include the following:
  • Summarized data based on elapsed time, CPU time, or I/O counts, as a series of intervals or a threshold limit.
  • Reporting details at request level, including identification, performance, counts, error code, and SQL text.
  • Any or all of the following:
    • Objects used in request
    • Steps and performance data per step
    • Full SQL text
    • EXPLAIN text
    • Optimizer query plan information logged as an XML document

For example, you can define rules 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 start and end of logging activity. You may change these rules dynamically to support management of the Vantage system.