Result of the heuristic-based query optimization
Previously,
we studied
applying
highly cost reducing Algebraic Laws
to obtain
a optimal logical query plan:
Choice of different join ordering
We can consider each
input set
to the join operation
as an input relation
(= a table of tuples):
Choice of different join ordering
If there are > 2 input relations
to the (generalized) join operator:
We have to find the
best join ordering
of the join operations:
How to evaluate different join ordering ?
The best
join ordering is the
one that has the
least # tuples in
all the result sets:
Because
# tuples is
proportional to
# disk IO needed
Important observation on the result sets
The set of tuples selected by
the top most ⋈ operation
in every join ordering
are
equal:
Reason:
all the different query plans are
equivalent
(the Relational Algebra expressions are equal to each other) !!!
We will use this fact to
simplify how we
compute the
total # tuples
produced by a query plan
Estimating the
# tuples in a result set
In order to
find (= estimate) the
# tuples in
the output of an
operation:
We will study these topic in the next few webpage....
❮
❯