Cost of sorting (as in money cost)
I'm watching a video on query tuning in Microsoft SQL Server and the tutor made an interesting point about sorts that probably also applies to Oracle as well. He argues that unless you're also using TOP to get the top N results (or something similar where a sort is required by another operation) you should not do sorts in the database but do them in the application layer. His rationale is that SQL Server, like Oracle, is licensed per CPU; if you're using a cloud service then you will be billed per CPU allocated or by the execution time your code spends on the CPU. Sorts are very CPU intensive, the example he showed took about 800ms to just return 2.5million rows unsorted but 3.5s (about 4.4 times as long) with a sort. Applications are more likely to be licensed per user so it's probably cheaper to add more CPU there than in the database server.