Re: Parallel Aggregate - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Parallel Aggregate
Date
Msg-id CA+TgmoYP0GwvaTN0ofxu213G8ypOqkxR7KkkV5jGZL_3v-71mQ@mail.gmail.com
Whole thread Raw
In response to Re: Parallel Aggregate  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
On Tue, Mar 8, 2016 at 4:26 PM, David Rowley
<david.rowley@2ndquadrant.com> wrote:
>> The first one in the list will be the cheapest; why not just look at
>> that?  Sorted partial paths are interesting if some subsequent path
>> construction step can make use of that sort ordering, but they're
>> never interesting from the point of view of matching the query's
>> pathkeys because of the fact that Gather is order-destroying.
>
> In this case a sorted partial path is useful as the partial agg node
> sits below Gather. The sorted input is very interesting for the
> partial agg node with a strategy of AGG_SORTED. In most cases with
> parallel aggregate it's the partial stage that will take the most
> time, so if we do get pre-sorted partial paths, this will be very good
> indeed for parallel agg.

OK.  So then you probably want to consider the cheapest one, which
will be first.  And then, if there's one that has the pathkeys you
want, also consider that.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: fun with "Ready for Committer" patches
Next
From: Robert Haas
Date:
Subject: Re: Proposal: RETURNING primary_key()