Estimate the number of block transfers and seeks required by your solution to Exercise 15.19 for , where and are as defined in Exercise 15.3.


Assume the relations and have a secondary B+-tree index. Assume also, the leaf nodes of their indices is stored consecutively on the hard disk. Let the number of leaf nodes in the index of relation be . Similarly let the number of leaf nodes in the index of relation be .

Thus merge-joining the leaf nodes of the indices will cost us block transfers, where is the number of output blocks. Assuming that buffer blocks are allocated to each series of leaf nodes and for the output relation, the number of disk seeks required would be .

Then since we need to sort the output on the pointers of we will perform block transfers and disk seeks. Let be the number of blocks of the resulting relation. Then since we also need to re-sort the output on the pointers of , we will perform block transfers and disk seeks.

Thus the total number of block transfers will be:

where is the number of blocks that we have to fetch when dereferencing the pointers of (for ).

And the total number of seeks will be: