Ordered clustering/non-clustering
indexes
An ordered
clustering index
(a1 < a2):
An ordered
non-clustering index
(a1 < a2):
Adapting the Sort-Join algorithm to a
ordered clustering index
We can access the
tuples in
sorted order using
a (ordered) clustering index as
follows:
1. Scan the
(ordered) index file
2. Access a
chunks of
tuples that contains
the next smallest join value
Adapting the Sort-Join algorithm to a
ordered non-clustering index
We can access the
tuples in
sorted order using
a (ordered) non-clustering index as
follows:
1. Scan the
(ordered) index file
2. Access the next
(one)
tuples that contains
the next smallest join value
The Zig-zag Join Algorithm
When can we use the Zig-zag Join Algorithm
(Assuming that
relations R and S are
not sorted !!!)
(If relations R and S are
sorted, we can
use the
(one-pass) Sort-Join algorithm !!)
❮
❯