8. Sort-based Aggregation
2. aggregate consecutive records
Input records
split into runs
sorted sorted sorted sorted
sort individually
merge all runs
sorted
result
aggregate
1. sort all records by group attributes
14. Hash-based Aggregation
What if hashtable grows too large?
records
key = group attributes
...
hash
function
buckets
00
01
02
03
99
...
cache miss!
cache miss!