Re: Top-N sorts verses parallelism

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Top-N sorts verses parallelism
Date: 2017-12-19 12:02:32
Message-ID: CAA4eK1Jzdg3baQRqyGSQj94=sQL2QWUtEpYd2Kko35bNqSLeag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 19, 2017 at 5:24 PM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> On Mon, Dec 18, 2017 at 9:29 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> I went through the callers to create_sort_path and the only one that
>> looks like it can pass a limit is the one you and Jeff already
>> identified. So I think the question is just whether
>> create_gather_merge_path needs a similar fix.
>
> I might be missing something, but it looks like there are no cases
> where we have a limit_tuples value we could use AND we're relying on
> create_gather_merge_path's own ability to create sort paths. So I
> suspect there is no reason to change create_gather_merge_path itself
> to deal with tuple limits.
>

Exactly. I was about to post the same and my analysis results are
same as yours. I think this raises the question, do we really need
cost_sort at that place and if so for which case?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2017-12-19 12:05:55 Re: [HACKERS] Add support for tuple routing to foreign partitions
Previous Message Thomas Munro 2017-12-19 11:54:38 Re: Top-N sorts verses parallelism