Sorts

Oracle uses a Sort to perform a number of different functions:

When Oracle performs a sort, all of the matching rows are written to a temporary area (the Sort Area), sorted, and then read back in to the next stage of execution. Small sorts will occur in memory, but a large sort will need to be written out to disk. Whilst the cost of sorting the rows is significant, the IO involved in the read and the write steps can really blow a query out.

If your Explain Plan contains a SORT, consider whether it really needs it.

If your Explain Plan contains two or more sorts, can they be reduced to one or avoided altogether?