# Question: 2 consider a relation r that takes up 155 blocks...

###### Question details

2. Consider a relation r that takes up 155 blocks on disk. If you have exactly 10 blocks of memory available:

a. How many passes would be required to perform an external sort-merge? Recall that sort-merge requires 1 initial sorting phase + some number of merging passes. Please be clear if you are including the sorting phase in your answer or just number of merging steps.

b. What is the estimated block transfer cost of performing external sort-merge given these numbers? (150 blocks of data and 10 blocks of memory)

Please do not count the final write of the sorted output.

c. How many memory blocks would you need to sort relation r in exactly 2 passes total (1 sorting phase + 1 merging phase)?

d. Given 8 blocks of memory, how much data can you sort in
exactly 3 passes total (1 sorting phase + 2 merging phases)? I.e.
how big can relation r get before you would need more than 2
merging steps to sort it? **Note** that you have 8
blocks of memory here and not 10 as in previous questions.