BEGIN QUERY CAPTURE Examples | Teradata Database - Example: Using the Default TDQCD Database to Capture and Store a Query Plan in XML Format - Teradata Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Database
Release Number
20.00
Publication Date
June 2025
Content Type
SQL Reference
Publication ID
B035-1144-200K
ft:locale
en-US
ft:lastEdition
2026-10-28
dita:mapPath
mbm1747160743883.ditamap
dita:ditavalPath
jlp1749501702948.ditaval
ft:sourceId
dita
dita:id
mdr1472255012272
lifecycle
latest

This request specifies all of the supported options and uses the default TDQCD database to store the query plan data.

BEGIN QUERY CAPTURE AS workload wl_2;
SELECT *
FROM employee
WHERE emp_code > 2;

An END QUERY CAPTURE request ends the BEGIN QUERY CAPTURE mode.

END QUERY CAPTURE;