Query and Workload Analysis Statements | SQL Fundamentals | Teradata Vantage - Query and Workload Analysis Statements - Advanced SQL Engine - Teradata Database

SQL Fundamentals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
zwv1557098532464.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1141
lifecycle
previous
Product Category
Teradata Vantage™

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.

  • The last release of Teradata Index Wizard is Teradata Tools and Utilities 16.20.
  • 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.