DUMP EXPLAIN Examples | SQL Statements | VantageCloud Lake - DUMP EXPLAIN Examples - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The following example set uses the same SELECT request throughout to show how the different syntax options of DUMP EXPLAIN produce different results.

Each DUMP EXPLAIN request generates a set of INSERT requests for the query plan produced by the Optimizer for the modified SELECT request.

Example: DUMP EXPLAIN Request with Null Query Plan Name

The output of this DUMP EXPLAIN request has a null query plan name in the TLE_queries database. Compare this to Example: DUMP EXPLAIN Request with Query Plan Name, which assigns a name to the dumped query plan.

DUMP EXPLAIN INTO TLE_queries
     SELECT emp_id, emp_address
     FROM employee
     WHERE emp_name = 'Smith';

Example: DUMP EXPLAIN Request with Query Plan Name

The output of this DUMP EXPLAIN request is referenced under the query plan name Employee Smith Query in the TLE_queries database.

DUMP EXPLAIN INTO TLE_queries AS "Employee Smith Query"
     SELECT emp_id, emp_address
     FROM employee
     WHERE emp_name = 'Smith';