Let relations r1(A, B, C) and r2(C, D, E) have the following properties: r1 has
20,000 tuples, r2 has 45,000 tuples, 25 tuples of r1 fit on one block, and 30
tuples of r2 fit on one block. Estimate the number of block transfers and seeks
required using each of the following join strategies for r1 ⋈ r2: Block nested-loop join.
Solved 1 Answer
See More Answers for FREE
Enhance your learning with StudyX
Receive support from our dedicated community users and experts
See up to 20 answers per week for free
Experience reliable customer service
Step 1Block nested-loop join:The “r1” needs (20000/25)=800 blocks and “r2” needs (45000/30)=1500 blocks.Let assume “M” pages of memory. If “M” is greater than 800, the join can easily done in 1500+800 disk accesses, using even plain nested loop join.So one can consider only the case where “M” less than or equal to 800 pages.Step 2If, “r1” is the outer relation the user need,[800/M-1]*1500+800 disk accesses.If, “r2” is the outer relation the user need,[1500/M-1]*800+1500 disk accesses. ...