×

External sorting using key value distribution and range formation

  • US 4,575,798 A
  • Filed: 06/03/1983
  • Issued: 03/11/1986
  • Est. Priority Date: 06/03/1983
  • Status: Expired due to Term
First Claim
Patent Images

1. A method for executing an external distribution sort, the data to be rearranged including N keyed records accessed by a CPU from associative secondary storage, the CPU having predetermined available internal memory of F records capacity, comprising the steps of:

  • random sampling of S keys, internally sorting the sampled keys within the CPU, and representing the sorted order by a sequential pointer list;

    forming equal sized partitions averaging N/S<

    F records in a single pass by obtaining a histogram of keys and ranges of key values including for each key the step of performing a binary search on the pointer list to ascertain the range associated with the key, and forming S+1 ranges and denoting the sorted key values by X1, X2, . . . . , XS for each value i from one to S+1, the ith range including the set of records whose key value lies in the semi-closed interval Xi-1 to Xi, and combining contiguous lesser populated ranges to form larger ranges such that each partition fits within the CPU internal memory; and

    associatively retrieving all of the records whose keys lie within a range of a partition and internally sorting said records.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×