Abstract :
A simple sort computation technique which allows some types of computation to be performed during the sort is presented. Sort aggregation and sort distribution are the two basic forms of sort computation discussed. Sort aggregation generates an accumulative or aggregate result for each group of records and places this result in one of the records. An aggregate operation can be any operation that is both associative and commutative, i.e. any operation whose result does not depend on the order of the operands or the order in which the operations are performed. Addition, multiplication, AND, OR, and EXCLUSIVE-OR are examples of valid operations. Sort distribution copies the value from a field of a specific record in a group into that field in every record of that group. The record that contains the value to be distributed contains a flag that is set to true. There may be more than one record in a group in which the flag is set, as long as all such records contain the same value. Aggregate distribution, optimization of sort computation, examples of sort computation, virtual locality, and applications of sort computation are presented