Access plans - examples
Examples of access plans illustrate the difference between plan execution with and without asynchrony optimization.
The first two examples show how the union and merge join plans in Asynchronous processing of federated queries - examples look when asynchrony is enabled.
For simplicity, the examples show plans with SHIP operators only. Asynchrony optimization transforms the plan the same way for RPD operators as for SHIP operators. SHIP and RPD operators are interchangeable, unless otherwise noted.
Example
1a: Plan without asynchrony
RETURN
|
UNION
/ | \
SHIP SHIP SHIP Example 1b: Plan with asynchrony
RETURN
|
UNION
/ | \
SHIP ATQ ATQ
| |
SHIP SHIPExample 2a: Plan without asynchrony
RETURN
|
MSJOIN
/ \
SCAN FILTER
| |
SORT SCAN
| |
SHIP SORT
|
SHIP
Example 2b: Plan with
asynchrony
RETURN
|
MSJOIN
/ \
SCAN FILTER
| |
SORT SCAN
| |
SHIP SORT
|
ATQ
|
SHIP
Example 3a: Plan without
asynchrony
RETURN
|
HSJN
/ \
SHIP SHIPExample 3b: Plan with asynchrony
RETURN
|
HSJN
/ \
ATQ SHIP
|
SHIPExample 4a: Plan without asynchrony
RETURN
|
NLJN
/ \
SHIP SCAN
|
TEMP
|
SHIPExample 4b: Plan with asynchrony
RETURN
|
NLJN
/ \
SHIP SCAN
|
TEMP
|
ATQ
|
SHIPExample 5a: Plan without asynchrony
RETURN
|
UNION
/ \
SHIP SHIP
|
NLJN
/ \
SHIP NICK2
|
SHIP
|
NICK1
RPDs cannot replace the SHIP-SHIP pair in this plan. Example
5b: Plan with asynchrony
RETURN
|
UNION
/ \
SHIP SHIP
|
NLJN
/ \
SHIP NICK2
|
ATQ
|
SHIP
|
NICK1Example 6a: Plan without asynchrony
RETURN
|
MSJOIN
/ \
SHIP FILTER
|
SCAN
|
SORT
|
HSJN
/ \
SHIP SHIPExample 6b: Plan with asynchrony
RETURN
|
MSJOIN
/ \
SHIP FILTER
|
SCAN
|
SORT
|
HSJN
/ \
ATQ ATQ
| |
SHIP SHIPExample 7a: Plan without asynchrony
RETURN
|
UNION
- - - - - - - - - - - - - - - - - - - - -
| | |
MSJOIN SHIP TQ
- - - - - - - |
| | LOCAL
MSJOIN FILTER
/ \ |
SHIP FILTER SHIP
|
SCAN
|
SORT
|
SHIP
Example 7b: Plan with asynchrony
RETURN
|
UNION
- - - - - - - - - - - - - - - - - - - - -
| | |
MSJOIN ATQ TQ
- - - - - - - | |
| | SHIP LOCAL
MSJOIN FILTER
/ \ |
SHIP FILTER ATQ
| |
SCAN SHIP
|
SORT
|
ATQ
|
SHIP