Consider the expression

(a) Sort-merge join
(b) Block nested loops
where r has 1,000 tuples, 20 tuples per page; s has 2,000 tuples, 4 tuples per page; and the main memory bu er for this operation is 22 pages long.

Relation r has 50 pages and s has 500 pages. In each case we ignore the cost of outputting the result, as it is the same for both methods.

(a)

Thus, assuming that merging can be done during the last phase of sorting, the total cost should not exceed 3200 page transfers.

(b) Assuming that r is scanned in the outer loop, the cost is 50 + (50/20)*500 = 1300.

Computer Science & Information Technology

You might also like to view...

Virtual folders that display the contents of multiple folders, as if the files were all stored in one folder, are called ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

The ________ option enables you to start an animation by clicking the slide or trigger on the slide

Fill in the blank(s) with correct word

Computer Science & Information Technology