Perform the following procedure to create the tables for the query capture database using BTEQ.
The procedure assumes that you have already created QCD_database_name.
- Start BTEQ.
- Change your current database or user to the database in which the QCD tables are to be created as follows.
DATABASE QCF_database_name;
where QCF_database_name is the name of the database you created for the QCD tables.
- Perform the following steps in the indicated order.
- .SET WIDTH 254
- .EXPORT FILE = file_name
- SELECT TabDefinition
FROM systemfe.CreateQCF
ORDER BY SeqNumber;
- .EXPORT FILE = file_name
- .RUN FILE = file_name
where file_name is the name of the file you create to contain the output of the SELECT request.
- Secure QCD by granting the appropriate privileges to the users who must analyze its data.
To use the BEGIN QUERY CAPTURE request to insert data into the QCD tables in TDQCD, you must have the ALL privilege.
See Column-Level Privileges and Teradata Row Level Security Privileges for information about how to implement column-level and row-level security for your tables.
You can implement additional secured access by creating views on QCD.
- Populate the QCD tables using the appropriate tools.
Purpose Tool Capture query plans BEGIN QUERY CAPTURE Capture request plans INSERT EXPLAIN Capture statistical and demographic data These statements: - COLLECT DEMOGRAPHICS
- COLLECT STATISTICS (QCD Form)
- INSERT EXPLAIN WITH STATISTICS
Create workloads for index analysis Workload macros