1. A method, comprising: receiving, by at least one processor having a plurality of threads, input having records stored in random access memory; distributing, by the at least one processor, the input into portions, one of the plurality of threads having an assigned portion; aggregating, by the at least one processor, the records in the assigned portion based on locality of keys in the records; and outputting, by the at least one processor, the aggregated records into a global hash table.