RSS Feed

Multiple Choice Questions - Merge Join

Multiple Choice Questions - Merge Join

1. In SQL Server 2012, the merge join does not need any equijoin predicate.

A) True
B) False

2. A merge join can be . . . . .

A) many-to-one
B) many-to-many
C) one-to-one
D) one-to-many

3. Inputs to the merge join may or may not be sorted on the join keys.

A) True
B) False

4. With a merge join each table is read at most once, and the total cost is proportional to the . . . . . of the number of rows in the inputs. Thus, merge join is often a better choice for larger inputs.

A) proportion
B) product
C) sum
D) none of above

5. Merge joins support all outer and semi-join variations.

A) True
B) False

6. SQL Server can get sorted inputs for a merge join in two ways: It can explicitly sort the inputs using a sort operator or it can read the rows from an index. In general, a plan using an index to achieve sort order is . . . . . . than a plan using an explicit sort.

A) cheaper
B) costlier
C) sometimes cheaper and sometimes costlier
D) none of above

7. A merge join necessarily need to scan every row from both inputs. As soon as it reaches the end of either input, the merge join stops scanning.

A) True
B) False

8. Merge join supports multiple equijoin predicates as long as the inputs are sorted on . . . . . . the join keys.

A) some of
B) one of
C) all
D) none of above

9. Merge join supports a special case where in some cases, the optimiser generates a merge join for a full outer join, even without an equijoin predicate.

A) True
B) False

10. Merge join itself is generally slow, but it can be an expensive choice if sort operations are required.

A) True
B) False

Answers