In Oracle, sorting occurs under the following circumstances:
- Using the ORDER BY clause in SQL
- Using the GROUP BY clause in SQL
- When an index is created
- When a SORT is invoked by the SQL optimizer because inadequate indices exist for a table join
- Using UNION, INTERSECTION, or MINUS clauses that cause sort-merge joins
- Using the DISTINCT clause
In short, the Oracle database will perform sorting operations whenever it detects the need to re-sequence row information.
In this module, you will learn about the tuning considerations related to sorting.
By the end of this module, you will be able to: