Re: parallelism and sorting - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: parallelism and sorting
Date
Msg-id CAA4eK1LJ-PmEB=0m3S7uZdwi3cqf1OksN9jt4ADnpG2tOLWqdQ@mail.gmail.com
Whole thread Raw
In response to Re: parallelism and sorting  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: parallelism and sorting  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Tue, Nov 24, 2015 at 8:59 AM, Robert Haas <robertmhaas@gmail.com> wrote:

One idea about parallel sort is that perhaps if multiple workers feed
data into the sort, they can each just sort what they have and then
merge the results.

Sounds like a good approach for parallel sorting, however small extension
to it that could avoid merging the final results is that workers allocated
for sort will perform range-based sorting. A simple example to sort integers
from 1-100 will be, worker-1 will be responsible for sorting any integer
between 1-50 and worker-2 will be responsible for sorting integers from
51-100 and then master backend just needs to ensure that it first returns
the tuples from worker-1 and then from worker-2.  I think it has some
similarity to your idea-5 (use of repartition), but not exactly same.



With Regards,
Amit Kapila.

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: New email address
Next
From: Ants Aasma
Date:
Subject: Re: parallelism and sorting