CS FundamentalsHardGATE CS · Product placement
R has 1600 tuples in 80 blocks and S has 20000 tuples in 500 blocks. With only enough memory for one block of each relation, how many block transfers does the TUPLE-at-a-time nested-loop join with R as outer need, and how many does the block nested-loop join with R as outer need?
- A. 800,080 and 800,000
- B. 1,600,500 and 40,500
- C. 32,000,080 and 40,080
- D. 800,080 and 40,080
Correct answer: D. 800,080 and 40,080
Tuple NL reads S once per R tuple: 1600·500 + 80. Block NL reads S once per R block: 80·500 + 80.
More DBMS and SQL questions
- Classify the schedule R1(A), W2(B), W1(A), R2(B), W1(B), W2(A), R3(A), W3(B), W3(A).
- Classify the schedule W1(B), W1(A), W3(B), R1(B), R2(B), W3(A), W2(B), R2(A), R3(A).
- Consider the schedule W3(C), W2(A), W1(A), R1(C), R2(A), R2(C), W3(A). Which statement is correct?
- A B+ tree index uses 1024-byte blocks, 10-byte search keys, 6-byte block (tree) pointers and 8-byte record pointers. What is the maximum…
- R(A, B, C, D, E) has functional dependencies E → B, B → A, D → B, A → D. Which decomposition of R is lossless-join?
- R(A, B, C, D, E) with functional dependencies B → C, D → CE, A → B, CE → A is decomposed into R1(A, B), R2(A, C, E), R3(C, D, E). Which…