Keyword to use in specifying logging options for request objects, the AMP steps produced to perform the request, the EXPLAIN text for the request, the SQL request text, or the optimizer request plan as an XML document.
You cannot specify logging options if you specify LIMIT SUMMARY.
Specifying any of the logging options can impact system performance.
Only the default set of query information is logged in a defined default row for each request for each specified user, unless you specify a logging option or WITH NONE.
For descriptions of these options and option modifiers, see “Tracking Query Behavior with Database Query Logging” in Teradata Vantage™ - Database Administration, B035-1093.
- ALL
- Information is logged for the EXPLAIN, OBJECTS, SQL, and STEPINFO options. Information is not logged for the XMLPLAN, LOCK, STATSUSAGE, PARAMINFO, FEATUREINFO, UTILITYINFO, or USECOUNT options.
- EXPLAIN
- The EXPLAIN text for the request is logged.
- LOCK=n
- Lock contentions longer than n centiseconds are logged in XML format. For more information on DBQLXMLLockTbl, including how to shred the lock plan data, see the DBQL information Teradata Vantage™ - Database Administration, B035-1093.
- NONE
- DBQL data is not logged for the items you specify, including:
- account:user pair or account:user list
- application name or application name list
- user name list
- ALL:account name
- ALL:account name list
- ALL without any other specification, which specifies all accounts
- OBJECTS
- Database, table, column, and index information is logged.
- NO COLUMNS OBJECTS
- Column data is not logged in DBQLObjTbl. This option can reduce logging overhead for tables with a large number of columns.
- PARAMINFO
- Parameter values and metadata are logged in DBQLParamTbl.
- FEATUREINFO
- Log feature usage information into the FeatureUsage column of DBQLogTbl.
- SQL
- Full text of all SQL statements is logged.
- STATSUSAGE
- Query optimizer statistics and usage recommendations are logged in an XML document for optimized DML requests.
- DETAILED STATSUSAGE
- The following statistics details for all of the database objects referenced in the plan for a request are logged:
- StatTimeStamp
- Version
- OrigVersion
- NumColumns
- NumBValues
- NumEHIntervals
- NumHistoryRecords
- NumNulls
- NumAllNulls
- NumAMPs
- NumPNullDistinctVals
- PNullHighModeFreq
- AvgAmpRPV
- HighModeFreq
- NumDistinctVals
- NumRows
- CPUUsage
- IOUsage
- STEPINFO
- AMP step-level information is logged.
- USECOUNT
- Use count information is logged for a database or user. Collects use count information on the specified databases or users, regardless of who is accessing the database objects.
- UTILITYINFO
- Utility information is logged in DBC.DBQLUtilityTbl.
- XMLPLAN
- The plan is logged in XML format for DDL, DML, and DCL requests. For DDL statements, XMLPLAN logs basic information such as StatementType and the corresponding StepNames.
- VERBOSE XMLPLAN
- The VERBOSE EXPLAIN text for a request is logged in XML format. Also includes details on SpoolAsgnList and HashFields that are not available with EXPLAIN.