Using EXPLAIN to Determine the Database Objects that a View Accesses - Advanced SQL Engine - Teradata Database

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
vjt1596846980081.ditamap
dita:ditavalPath
vjt1596846980081.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantageā„¢

Explaining a request does not necessarily report the names of all the underlying database objects accessed by that request, but it does provide the names of all the base tables accessed.

To determine the objects that a particular view accesses, including any nested views, use the SHOW statement. See Teradata Vantageā„¢ - SQL Data Definition Language Syntax and Examples, B035-1144.

For example, the following request reports the create text and containing databases for all underlying tables and views accessed by view_name.

     SHOW QUALIFIED SELECT *
     FROM view_name;

On the other hand, the following request reports only the underlying tables accessed by view_name, and not any nested views that are accessed.

     EXPLAIN SELECT *
     FROM view_name;