Page 1 of 1

Consider the following three relations: R(a,b,c), S(d,e), W(f,g,h). Assume that R has 1000 tuples, S has 10,000 tuples a

Posted: Mon May 02, 2022 4:44 pm
by answerhappygod
Consider the following three relations: R(a,b,c), S(d,e),
W(f,g,h). Assume that R has 1000 tuples, S has 10,000 tuples and W
has 100 tuples. Also, assume that each page stores 10 tuples, so R
has 100 pages, S has 1000 pages, and W has 10 pages. Assume a
buffer of 5 pages. Consider now the following SQL Query:
SELECT *
FROM R, S, W
WHERE R.a = S.d AND R.c = W.h
Assume that all relations are stored in heap files, there are no
indexes, only (BNL) block nested-loop joins can be used, and the
selectivity of each join is 0.1%. That is, the join between two
tables will produce 0.1% of the Cartesian product result (the
maximum possible result between the two tables). Show the query
plan selected by a System R based query optimizer. Use the number
of disk IO operations as the cost function. Hints: 1) Remember that
a System R optimizer will try to avoid Cartesian products in the
plan. So do NOT consider such plans. 2) The System R optimizer will
only consider left-deep plans.