Consider the join of relations R(a,b), S(b,c), T(c,d), and U(a,d), where R and U each have 1000 tuples, while S and T each have 100 tuples. Further, there are 100 values of all attributes of all relations, except for attribute c, where V(S,c) = V{T,c) - 10.
a) What is the order selected by the greedy algorithm? What is its cost?
b) What is the optimum join ordering and its cost?