CS FundamentalsModerateGATE CS
R has 10,000 tuples in 500 blocks and is the outer relation of an indexed nested-loop join with S. S has a B+ tree on the join attribute (its primary key) of height 3, and each probe costs 3 index blocks plus 1 data block. How many block accesses does the join need?
- A. 30,500
- B. 40,000
- C. 40,500
- D. 2,500
Correct answer: C. 40,500
Each of the 10,000 outer tuples needs one probe of 3 + 1 = 4 accesses, plus 500 accesses to scan R: 500 + 40,000 = 40,500. Counting probes per block of R instead of per tuple gives the much smaller wrong figure.
More DBMS and SQL questions
- A sorted file has 60,000 records of 200 bytes stored unspanned in 4096-byte blocks. A sparse primary index has 20-byte entries (one per…
- R has 2000 tuples and S has 5000 tuples. The join attribute A has 50 distinct values in R and 200 in S. Under the usual uniformity and…
- R(S, C) = {(1, a), (1, b), (2, a), (3, a), (3, b), (3, c), (4, b)}. What is R ÷ πC(σ{S = 1}(R))?
- An ER diagram has entity Employee (key eid, composite attribute name, multivalued attribute phone), weak entity Dependent (partial key…
- A ternary relationship Supplies links Supplier, Part and Project, and the rule is: for a given project and part there is at most one…
- The system crashes after the last record of this log (immediate modification; <Ti, X, old, new>; at the checkpoint all dirty pages were…