摘要 |
PURPOSE:To sort data efficiently which exceed the capacity of a buffer by dividing the relation to be sorted into units of sorter capacity, by performing external sort of the respective two sets of divided relations using a merger and by repeating these operations. CONSTITUTION:An original relation A1 is divided into capacity units of a sorter 12, and A11-A14 are obtained. Next, A11-A14 are sorted by the sorter 12 and A21-A24 are obtained. Next, A21-A24 are sorted by a merger ' 10, and A31-A32 are obtained. Similarly, A33-A34 are obtained from A23-A24. Next, (A31, A32) and (A33, A34) are sorted by the merger 10 into two sets of relations, and finally a relation A4 is obtained which is the sorted form of the original relation A1. When this operation is repeated, finally a relation S1, which consists of sub-relations S11-S1n, and a relation S2 which consists of sub-relations S21-S2m are obtained. When the relations S1 and S2 are merged by the external sorting function of the merger 10, an output relation S3 is obtained. |