Finding things Quickly V: Sorting a Disk File in Memory
If the entire content of a file can be held in memory, then we can perform an internal sort. Sorting in memory is very efficient.
However, if the file does not hold entirely in memory, any sorting algorithm will require a large number of seeks. Sorting would, thus, be extremely slow. Unfortunately, this is often the case, and solutions have to be found.