Indexing, Storage & Query Processing

Answer & solution
Official answer: A
1. Set up the reasoning. With two input buffers, scan the inner relation once for each outer block. For block counts br and bs, compare br+br·bs with bs+bs·br, ignoring common output writes.
2. Derive the result. With one input-block buffer for each relation and one output buffer, block nested loops cost b_outer+b_outer·b_inner reads, excluding common output cost. The product is unchanged by swapping, but the initial outer scan is smaller when r is outer. Thus A, interpreting size as disk-block count.
3. Check the interpretation. The product cost is symmetric, but the one-time outer scan is not. The smaller block-count relation is therefore the better outer input. Selectivity can change result size but does not remove the specified nested-loop input scans.