15.00 - Query and Workload Analysis Statements - Teradata Database

Teradata Database SQL Fundamentals

Teradata Database
Programming Reference

Query and Workload Analysis Statements

Data Collection and Analysis

Teradata provides the following SQL statements for collecting and analyzing query and data demographics and statistics:


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.

    For information on Optimizer cost profiles, see SQL Request and Transaction Processing.

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

    Related Topics

    For details on BEGIN QUERY LOGGING, END QUERY LOGGING, and SHOW QUERY LOGGING, see SQL Data Definition Language. For more information on other query and workload analysis statements, see SQL Data Manipulation Language.

    For more information on the Teradata Index Wizard, see Teradata Index Wizard User Guide.