The Community for Technology Leaders
Green Image
Issue No. 07 - July (1989 vol. 15)
ISSN: 0098-5589
pp: 917-925
<p>Heapsort is an internal sorting method which sorts an array of n records in place in O(n log n) time. Heapsort is generally considered unsuitable for external random-access sorting. By replacing key comparisons with merge operations on pages, it is shown how to obtain an in-place external sort which requires O(m log m) page references, where m is the number of pages which the file occupies. The new sort method (called Hillsort) has several useful properties for advanced database management systems. Not only does Hillsort operate in place, i.e., no additional external storage space is required assuming that the page table can be kept in core memory, but accesses to adjacent pages in the heap require one seek only if the pages are physically contiguous. The authors define the Hillsort model of computation for external random-access sorting, develop the complete algorithm and then prove it correct. The model is next refined and a buffer management concept is introduced so as to reduce the number of merge operations and page references, and make the method competitive to a basic balanced two-way external merge. Performance characteristics are noted such as the worst-case upper bound, which can be carried over from Heapsort, and the average-case behavior, deduced from experimental findings. It is shown that the refined version of the algorithm which is on a par with the external merge sort.</p>
performance characteristics; external Heapsort; sorting method; random-access sorting; Hillsort; database management systems; page table; buffer management concept; merge operations; page references; worst-case upper bound; sorting; storage management
J.I. Teuhola, L.M. Wegner, "The External Heapsort", IEEE Transactions on Software Engineering, vol. 15, no. , pp. 917-925, July 1989, doi:10.1109/32.29490
85 ms
(Ver )