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.
Index Analysis and Target Level Emulation
Teradata also provides diagnostic statements that support 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.
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.