CS FundamentalsModerateGATE CS · Product placement
R has 2000 tuples in 100 blocks and S has 10000 tuples in 400 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,100 and 800,000
- B. 1,000,400 and 40,400
- C. 800,100 and 40,100
- D. 20,000,100 and 40,100
Correct answer: C. 800,100 and 40,100
Tuple NL reads S once per R tuple: 2000·400 + 100. Block NL reads S once per R block: 100·400 + 100.
More DBMS and SQL questions
- Table Staff(id, name, dept, pay, boss) rows: (1, 'Anu', 'Ops', 40, NULL), (2, 'Bala', 'Ops', 55, 1), (3, 'Chitra', 'Tech', 70, 1), (4…
- Table Sale(id, rep, region, amt) rows: (1, 'Ira', 'N', 100), (2, 'Jai', 'S', 250), (3, 'Ira', 'S', NULL), (4, 'Kim', 'N', 300), (5, 'Jai'…
- Consider the schedule R2(B), R3(A), W3(A), R2(A), W2(B), R1(B), R1(A). Which statement is correct?
- The system crashes after the last record of this log (immediate database modification; <Ti, X> denotes an update with old and new values…
- R(A, B, C, D, E) has functional dependencies CE → A, B → AC, BE → CD, DE → B. How many superkeys does R have?
- Classify the schedule W1(B), W2(A), R2(B), C2, W1(A), C1 (Ci = commit of Ti) by the strongest property it satisfies.