SQL/MX 2.x Query Guide (G06.24+, H06.03+)

Parallelism
HP NonStop SQL/MX Query Guide523728-003
8-16
Plan Fragments
with 2 PA(s), log=exactly 1 partition, phys=range partitioned 2
ways on (([150]equiv(O.O_ORDERKEY))))
Plan Fragments
To understand the underlying parallelism in your plan, you can divide the query plan
into plan fragments. As discussed under Exchange Nodes and Plan Fragments on
page 8-3, a plan fragment is a part of the plan that executes in the same process and
has one of these nodes as its root:
ROOT: This fragment is called the root fragment or the master executor and
occurs only once per query plan.
ESP_EXCHANGE: These fragments are called ESP plan fragments and can occur
many times in a query plan.
PARTITION_ACCESS: These fragments are called DAM plan fragments and
represent the boundary between the DAM process and the partitions.
A query plan consists of one or more plan fragments. You identify the plan fragments
by first compiling the query and reviewing the EXPLAIN output. Fragment boundaries
are represented by the exchange nodes ESP_EXCHANGE and
PARTITION_ACCESS. Figure 8-6 shows plan fragments identified for a query plan.
Each exchange node is part of two fragments.
Draft out the query tree based on the EXPLAIN output. You can identify the plan
fragments as shown in Figure 8-6.
At execution time, one or more parallel instances are created for each plan fragment.
The root fragment always has one instance and is executed in the master executor.
ESP fragments (ESP_EXCHANGE as the top node) are executed in executor server
processes. The EXPLAIN output for the ESP_EXCHANGE node indicates the number
of instances created, as described under Understanding the Parallelism Tokens in the
EXPLAIN Output next.
DAM fragments (PARTITION_ACCESS as the top node) are executed in the Data
Access Manager. Only one active instance of a DAM fragment exists, unless a
SPLIT_TOP node is above the PARTITION_ACCESS node. The EXPLAIN output for
the SPLIT_TOP node indicates the number of instances created for the DAM fragment,
as described next.
Understanding the Parallelism Tokens in the EXPLAIN
Output
The exchange operators, ESP_EXCHANGE and SPLIT_TOP, contain tokens in the
DESCRIPTION column of the EXPLAIN output that describe the top and bottom
degree of parallelism for each plan fragment.
For the ESP_EXCHANGE operator, the top_degree_parallelism token indicates how
many instances of the fragment above the node exist. For ESP_EXCHANGE nodes