You are on page 1of 16

EXPLAIN Terminologies

A quick look

VPROCS Virtual
Processor
A set of software processes that run
on a node under the Teradata
Parallel Database Extensions (PDE)
within the multitasking environment
of the operating system.

Types

Parsing Engine

Access Module Processor

Parsing Engine
The Parsing Engine (PE) is the
VPROC that communicates with the
client system on one side and with
the AMPs on the other side.

Parsing Engine

Manage Sessions
Decomposes SQL statements into
steps
Returns the answer rows to the
requesting client.

AMPs
The AMP is the heart of the
Teradata RDBMS.

The AMP is a VPROC that performs


many database and filemanagement tasks.

EXPLAIN
Provides a summary of the access
and Join plans generated by the
Optimizer for the query
SQL_statement.

EXPLAIN
Specifies the following
Indexes to be used.
Identifies any intermediate spool
files.
Types of join to be performed.
Statements in a transaction would
be dispatched in parallel.

EXPLAIN
Use EXPLAIN only with data
returning statements.

Do not perform EXPLAIN


dynamically because the result is
unpredictable.

Some common terms


n partitions of
Only n of the partitions are
accessed. n is greater than one

Terms
a single partition of
Only a single partition is accessed

Terms
all-AMPs JOIN step by way of an allrows scan
On each AMP on which they reside,
spooled rows and/or primary table
rows are searched row by row; rows
that satisfy the join condition are
joined.

Terms
all-AMPs JOIN step by way of a
RowHash match scan
The first row is retrieved from the
first table; the hash code for that
row is used to locate a row from the
second table.

Terms
Each row hash match is located and processed as
follows:

The row hashes are compared. If not equal, the larger


row hash is used to read rows from the other table until
a row hash match is found, or until the table is
exhausted.
If match is found, each pair of rows with the same hash
code is accessed (one at a time) from the two tables.
For each such pair, if the join condition is satisfied, a
join result row is produced.
After all rows with the same row hash are processed
from both tables, one more row is read from each table.
The row hashes from these two rows are compared,
restarting the compare process.

Terms
all-AMPs RETRIEVE step by way of an
all-rows scan
All rows of a table are selected row
by row on all AMPs on which the
table is stored

For reference
Z:\Monthly\Reference\Manuals\Docs\Start_here.
bat

You might also like