Why left-deep trees work best for 1-pass algorithms
Claim:
is the best way to
execute
R ⋈ S ⋈ T ⋈ U
when using one-pass algorithm to
perform the
⋈ operation
Why left-deep trees work best for 1-pass algorithms
We consider how the
query plan will be
executed using
pipelining
to pass results between
operators
Why left-deep trees work best for 1-pass algorithms
Initally,
all ⋈ operators are
active
Why left-deep trees work best for 1-pass algorithms
So operator ⋈3
is now blocked
(i.e., it is not active)
Why left-deep trees work best for 1-pass algorithms
So operator ⋈2
is now blocked
(i.e., it is not active)
Why left-deep trees work best for 1-pass algorithms
Operator ⋈1
will
acquire
memory buffers for its
execution !!
Why left-deep trees work best for 1-pass algorithms
Remember that
memory buffers are
premium resources in
data processing !!
It's very important that the query execution
manage buffer allocation
Why left-deep trees work best for 1-pass algorithms
⋈2 must
index
all tuples in the
build relation before
executing phase 2 of the
1 pass algorithm !
So ⋈2 must
wait until
⋈1 has
finished before
starting its phase 2 !
Why left-deep trees work best for 1-pass algorithms
Notice that:
Why left-deep trees work best for 1-pass algorithms
Notice that:
Why left-deep trees work best for 1-pass algorithms
Advantage of
left-deep trees execution of
1-pass algorithms:
buffer re-use
Why other types of trees are less suitable for 1-pass algorithms
With:
Why other types of trees are less suitable for 1-pass algorithms
Why other types of trees are less suitable for 1-pass algorithms
We must introduce
additional
synchronization mechanisms to
block some
⋈ algorithms !
Why left-deep trees work best for 1-pass algorithms
❮
❯