Question: Consider processing the following SQL projection query: SELECT DISTINCT E . title, E . ename FROM Executives E You are given the following information: Executives
Consider processing the following SQL projection query: SELECT DISTINCT Etitle, Eename FROM Executives E You are given the following information: Executives has attributes ename, title, dname, and address; all are string fields of the same length. The ename attribute is a candidate key. The relation contains pages. There are buffer pages. Consider the optimized version of the sortingbased projection algorithm: The initial sorting pass reads the input relation and creates sorted runs of tuples containing only attributes ename and title. Subsequent merging passes eliminate duplicates while merging the initial runs to obtain a single sorted result as opposed to doing a separate pass to eliminate duplicates from a sorted result containing duplicatesapts How many sorted runs are produced in the first pass? What is the average length of these runs? Assume that memory is utilized well and any available optimization to increase run size is used. What is the IO cost of this sorting pass?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
