CSE Roadmap

Common tier · about 2 hours · 5 parts

Part 1 of 5 · 1 min read

Why this page comes first

In this module you will

  • Explain how sorting in memory differs from external sort, and why the difference matters.
  • Explain how sorting via an existing index can avoid a sort step entirely.
  • Recognize when an ORDER BY clause is likely to be the most expensive part of a query.
  • Decide whether an index could remove a sort an execution plan reveals.

The previous page mentioned sort-merge join relying on sorted input, and external sort as the technique for sorting data too large to fit in memory. This page covers that technique directly, and connects it to the everyday cost of a plain ORDER BY clause.