Re: parallelism and sorting

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: parallelism and sorting
Date: 2015-11-24 12:59:50
Message-ID: CAA4eK1LJ-PmEB=0m3S7uZdwi3cqf1OksN9jt4ADnpG2tOLWqdQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 24, 2015 at 8:59 AM, Robert Haas <robertmhaas(at)gmail(dot)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.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ants Aasma 2015-11-24 13:10:30 Re: parallelism and sorting
Previous Message Magnus Hagander 2015-11-24 12:33:19 Re: New email address