16.20 - Example: Logging Plans as XML Text - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

The XMLPLAN option is particularly useful for diagnosing performance issues with requests. Logging query plans in XML format enables the analysis of problematic requests using Teradata support tools.

This request logs the Optimizer request plans of all requests, including SQL DML and selected DDL statements, performed by user u1 as XML text in DBC.DBQLXMLTbl. Because the XML document contains the full SQL text, specify a LIMIT SQLTEXT value of 0 to avoid duplicate logging of the request text in DBC.DBQLogTbl:

     BEGIN QUERY LOGGING WITH XMLPLAN LIMIT SQLTEXT=0 on u1;