Sorting
•Illustrates the difference in algorithm design when your data is not in main memory:
–Problem: sort 1Gb of data with 1Mb of RAM.
•Arises in many places in database systems:
–Data requested in sorted order (ORDER BY)
–Needed for grouping operations
–First step in sort-merge join algorithm
–Duplicate removal
–Bulk loading of B+-tree indexes.