摘要 |
PROBLEM TO BE SOLVED: To perform grouping operation which requires sorting by a grouping column value at high speed by providing a means for extracting records from a data base and grouping them by using a hash method and a means for sorting the grouped records. SOLUTION: In hash grouping 102, ungrouped records are take out the data base, one by one, a hash value is obtained from a hash function 103 by using a grouping column value as a key, and grouped records are generated in a hash grouping area 104 and related in sorting order. In grouped record extraction 106, the grouped records are taken out of the hash grouping area 104 in the sorting order, which is always held. In sort grouping 107, ungrouped records stored in a work file 105 are sorted by the grouping column value to generate grouped records.
|