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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply