16.20 - Query and Workload Analysis Statements - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Fundamentals

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

Data Collection and Analysis

Teradata provides the following SQL statements for collecting and analyzing query and data demographics and statistics:
  • BEGIN QUERY LOGGING
  • COLLECT DEMOGRAPHICS
  • COLLECT STATISTICS
  • DROP STATISTICS
  • DUMP EXPLAIN
  • END QUERY LOGGING
  • INITIATE INDEX ANALYSIS
  • INITIATE PARTITION ANALYSIS
  • INSERT EXPLAIN
  • RESTART INDEX ANALYSIS
  • SHOW QUERY LOGGING
Collected data can be used in several ways, for example:
  • By the Optimizer, to produce the best query plans possible.
  • To populate user-defined Query Capture Database (QCD) tables with data used by various utilities to analyze query workloads as part of the ongoing process to re-engineer the database design process.

    For example, the Teradata Index Wizard determines optimal secondary indexes, single-table join indexes, and PPIs to support the query workloads you ask it to analyze.

Index Analysis and Target Level Emulation

Teradata also provides diagnostic statements that support the Teradata Index Wizard and the cost-based and sample-based components of the target level emulation facility used to emulate a production environment on a test system.

Settings should be changed in the production environment only under the direction of Teradata Support Center personnel.

Related Topics

For more information about:
  • BEGIN QUERY LOGGING, END QUERY LOGGING, and SHOW QUERY LOGGING, see Teradata Vantage™ SQL Data Definition Language Syntax and Examples, B035-1144.
  • Other query and workload analysis statements, see Teradata Vantage™ SQL Data Manipulation Language , B035-1146 .
  • Teradata Index Wizard, see Teradata® Index Wizard User Guide, B035-2506.