CHAPTER 13Sorting and Merge Joins

A merge join requires both its inputs to appear in sorted order, and quite often it is the sorting that uses more resources than the rest of the operation. Consequently, the first section of this chapter is all about sorting, with the mechanisms and costs of the merge operation appearing only in the latter part of the chapter.

Sorting is a rather special operation that is worth focusing on because it is such a common operation, and yet the actual mechanisms and resource requirements are still not commonly known. Oracle may need to use sorting for order by clauses, group by clauses, the distinct operator, merge joins, connect by queries, B-tree to bitmap conversions, analytic functions, set operations, index ...

Get Cost-Based Oracle Fundamentals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.