Query Capture Facility | Teradata Vantage - Quick Functional Overview of the Query Capture Facility - Analytics Database - Teradata Vantage

SQL Request and Transaction Processing

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
zfm1628111633230.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
evd1472255317510
lifecycle
latest
Product Category
Teradata Vantage™

The Query Capture Facility, or QCF, provides a method to capture and store the steps from any query plan in a set of predefined relational tables called the query capture database, or QCD.

You create your QCD databases using the procedures described in Teradata Vantage™ - Database Administration, B035-1093.

QCD Information Source

The principal source of the captured information in QCD is the white tree produced by the Optimizer, the same data structure used to produce EXPLAIN reports (the current implementation of QCD does not represent all the information reported by EXPLAIN). The white tree represents the output of the final stage of optimization performed by the Optimizer.

Statistical and other demographic information in the QCD is captured using the following set of SQL statements.
  • COLLECT DEMOGRAPHICS
  • COLLECT STATISTICS (QCD Form)
  • INSERT EXPLAIN WITH STATISTICS

For more information, see Teradata Vantage™ - SQL Data Manipulation Language, B035-1146 and Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.

QCD Physical Model

Note the following facts about the physical implementation of QCD databases.
  • Text columns that may contain names are explicitly defined as Unicode to ensure proper handling of any Teradata-supported character set.
  • The table SeqNumber feeds the values of the artificial sequential number columns defined for multiple QCD attributes.

See Teradata Vantage™ - Database Design, B035-1094 for information about physical capacity planning for your QCDs.

Applications of QCF and QCD

Vantage supports the following applications of QCF and QCD:
  • QCD can store all query plans for customer queries. You can then compare and contrast queries as a function of software release, hardware platform, and hardware configuration.
  • You can generate detailed analyses of captured query steps using standard SQL DML statements and third-party query management tools by asking questions like the following:
    • "How many spool files are used by this query?"
    • "Did this query plan involve a product join?"
    • "How many of the steps performed by this query were done in parallel?"