Scenarios of Detailed Logging - Analytics Database - Teradata Vantage

Database Administration

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-11-03
dita:mapPath
pgf1628096104492.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ujp1472240543947
lifecycle
latest
Product Category
Teradata Vantage™
IF you… THEN …
Objects
define a rule for a user specifying WITH OBJECTS if the user runs a SELECT that joins two tables owned by the same database:
  • One row for the query is logged in DBQLogTbl
  • Rows are logged in DBQLObjTbl as follows:
    • A row for the database
    • One row for each table
    • One row for each accessed column, based on the Optimizer plan for the query
define a rule with WITH OBJECTS and the user runs a query that causes the Optimizer to reference the same object twice
  • One row for the object is logged in DBQLObjTbl.
  • The value in the FreqofUse field is incremented to 2.
SQL
begin query logging with no options for a user, and that user subsequently logs on and runs a query a default row is logged for that user in DBQLogTbl with 200 characters of the SQL.
begin logging for a user with no options and the user runs a query with more than 200 characters a row is logged in DBQLogTbl that includes the first 200 characters of the query.
create a rule for a user that specifies LIMIT SQLTEXT= 0 and the user runs a query logging depends on the following:
  • If you also specified the WITH ALL or WITH SQL option, then the SQL text is logged only to DBQLSQLTbl.
  • If you did not also specify WITH ALL or WITH SQL, then no SQL characters are logged.
define a rule specifying LIMIT SQLTEXT=10000 and the user runs a query containing 15000 characters a row is logged in DBQLogTbl that includes the first 10,000 SQL characters.
create a rule specifying LIMIT SQLTEXT=32000 (or anything larger than 10,000) and the user runs a query comprising >31000 SQL characters a row is logged in DBQLogTbl that includes the first 10,000 SQL characters.
define a rule with just the WITH SQL option The first 200 characters of the SQL statement are logged in DBQLogTbl and the entire statement is logged in as many rows as required in DBQLSQLTbl.
define a rule with both the WITH SQL option and LIMIT SQLTEXT=1000 The first 1,000 characters of the SQL statement are logged in DBQLogTbl and the entire statement is logged in as many rows as required in DBQLSQLTbl.
define a rule with the WITH SQL option and LIMIT SQLTEXT=0 None of the SQL characters are saved in DBQLogTbl. The entire statement is logged in as many rows as required in DBQLSQLTbl.
Steps
define a rule with WITH STEPINFO and the user runs a query that does not generate parallel steps One row is logged in DBQLStepTbl for each step used to resolve the query. In each row, the value of StepLev2Num is 0.
define a rule with WITH STEPINFO and the user runs a query that generates parallel steps One row is logged in DBQLStepTbl for each step used to resolve the query and each parallel step is differentiated by the step level number in StepLev2Num.