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...

When using the Rectangle Marquee Tool or the Elliptical Marquee Tool, you can click the ____ button to choose how the size of the marquee selection is determined.

a. Control b. Style c. Sizing d. Shape

Computer Science & Information Technology

Create an SVG document that simulates a clock with a pendulum (i.e., hour hand, minute hand, pendulum). An example image is shown in Fig. 20.28.

Computer Science & Information Technology

The _____ is the node at the sending end of the tunnel, and it is responsible for encapsulating the IPv6 packet in an IPv4 header, then transmitting the packet in the tunnel.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

When using Design view, a query can only be sorted on a single criteria

Indicate whether the statement is true or false

Computer Science & Information Technology