10 likes | 70 Views
RST. DC. R.b. 2 join partitions. ST. S.a. DC. R. RS. R. S. T. T. S. ST. S.b. RS. DC. R.b. T.b. DC. T. S. S.b. S.a. DC. R. R.b. DC. R.a. Joins vs. Plans (Interesting orders). In-memory directory. SELECT R.b FROM R,S,T WHERE R.a = S.a and
E N D
RST DC R.b 2 join partitions ST S.a DC R RS R S T T S ST S.b RS DC R.b T.b DC T S S.b S.a DC R R.b DC R.a Joins vs. Plans (Interesting orders) In-memory directory SELECT R.b FROM R,S,T WHERE R.a = S.a and S.b = T.b; SELECT R.b FROM R,S,T WHERE R.a = S.a and S.b = T.b ORDER BY R.b ; Number of Joins = 4 Number of Plans = 12 15 Order on R.a is interesting (useful) for Merge-join with S