On Wed, 2007-12-19 at 14:41 -0800, Dann Corbit wrote:
> As long as sorting improvements are being considered, may I suggest an
> experiment that uses a very simple model?
>
> Assuming that you have K subfiles created by the initial sorting pass,
> insert the top record of each file into a priority queue.
>
> Then, emit records from the queue until the priority queue is empty.
>
What is the principle difference between that idea and our existing sort
algorithm?
There's a good explanation in the comment at the top of tuplesort.c.
Regards,Jeff Davis