CS FundamentalsHardGATE CS · DBMS
Relations R (1000 blocks) and S (500 blocks) are joined with block nested-loop join using M = 22 buffer blocks (M − 2 for the outer relation, one for the inner, one for output). What is the minimum number of block transfers, choosing the better outer relation?
- A. 500500
- B. 25500
- C. 26000
- D. 23500
Correct answer: B. 25500
With the smaller relation (500 blocks) outer: 500 + ⌈500/20⌉·1000 = 25500. Making the larger relation outer costs 26000.
More DBMS and SQL questions
- T1: W1(A), W1(B) and T2: R2(A), R2(B). Of all 6 interleavings that keep each transaction's own order, how many are conflict serializable?
- Table Staff(id, name, dept, pay, boss) rows: (1, 'Anu', 'Ops', 40, NULL), (2, 'Bala', 'Ops', 55, 1), (3, 'Chitra', 'Tech', 70, 1), (4…
- A buffer manager uses STEAL (uncommitted pages may be written to disk) and NO-FORCE (committed pages need not be written at commit). What…
- 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'…
- A file of 10,000 records is physically ordered on the non-key field dept, which has 500 distinct values. A clustering index on dept has…
- Which expression is equivalent to R ÷ S, where R(A, B) and S(B)?