None of the query execution plans in Figure 11.3 for queries (11.2)–(11.5) does duplicate elimination. To account for this, let us add one more relational operator, ?, which denotes the operation of duplicate elimination. Modify the plans in Figure 11.3 by adding ? in appropriate places so as to minimize the cost of the computation. Estimate the cost of each new plan.
What will be an ideal response?
Duplicates arise only as a result of the projection operator. Since all plans in Figure 11.3 have projection only as the last step, there is not much room for duplicate elimination: ? should be the last operator applied after ?Name. Duplicate elimination can done at no extra cost (in terms of I/O), because the in-memory bu?er is large enough to hold the result of the join (which we can sort on Name before passing it to the projection operator and then to the duplicate elimination operator).
Duplicate elimination does not save anything here either.
You might also like to view...
Two numbers are __________ if their greatest common divisor is 1.
Fill in the blank(s) with the appropriate word(s).
Typically, Web sites are delivered via which protocol?
(a) Netscape. (b) HTTP. (c) FTP. (d) IE5.