- Exhaustive search
over all join trees:
- We consider every possible tree
of
join operators
- Select the
join tree with
least number of tuples
in the intermediate results
|
Advantage:
- We will find the
true optimal tree
- Note:
this approach
will include
the left-deep
join trees
|
|
Disadvantage:
- Limit (space) search
to
left-deep join trees:
- Consider all
orderings of the
join operators that are
left-deep
- I.e.:
consider only
left-deep trees
|
- Select the
join ordering (tree) with
least number of
tuples in the
intermediate result
in a left-deep tree
|
- Use a heurtistic to find
the optimal
(left-deep) join ordering (tree)
- In many cases,
a greedy heuristic can find
the
same solution
as a complete space search
!!!
|
|