ANALYTIC¶
In this section, you will find the documentation for the translation reference of Analytic Language Elements.
EXPLAIN¶
Translation specification for the EXPLAIN clause.
As per Teradata's documentation, the EXPLAIN clause produces a step-by-step execution plan, which is a textual report that breaks down the query's execution into a series of steps.
The syntax for this statement is as follows:
EXPLAIN [ <SQL_statement> ];
Query¶
EXPLAIN SELECT * FROM table_1
Result¶
| Explanation |
|---|
|
Snowflake
Query¶
EXPLAIN SELECT * FROM table_1
Result¶
| ID | OPERATION | OBJECTS | SCHEDULE | PROJECTION | EXPRESSIONS | |
|---|---|---|---|---|---|---|
| 0 | ResultFinalize | 3 | [1] | |||
| 1 | Exchange (SINGLE) | |||||
| 2 | ResultWorker | 2 | [1] | |||
| 3 | Projection | 1 | [1] | |||
| 4 | RowGenerator | 0 | [] |
As you can see from the results, EXPLAIN in Teradata and Snowflake have the same goal: to provide an explanation of the steps that will be performed when a query is executed. However, Teradata uses a more verbose explanation compared to Snowflake, which only shows the name of each step to be executed.