Re: Why don't we consider explicit Incremental Sort? - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Why don't we consider explicit Incremental Sort?
Date
Msg-id CAMbWs48GsPHHXc7ccL524MkLcEiRq2M-5bxgt6AeW3OHW33UVw@mail.gmail.com
Whole thread Raw
In response to Re: Why don't we consider explicit Incremental Sort?  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Why don't we consider explicit Incremental Sort?
List pgsql-hackers
On Sun, Sep 22, 2024 at 1:38 PM David Rowley <dgrowleyml@gmail.com> wrote:
> Just looking at the commit message:
>
> > The rationale is based on the assumption that incremental sort is
> > always faster than full sort when there are presorted keys, a premise
> > that has been applied in various parts of the code.  This assumption
> > does not always hold, particularly in cases with a large skew in the
> > number of rows within the presorted groups.
>
> My understanding is that the worst case for incremental sort is the
> same as sort, i.e. only 1 presorted group, which is the same effort to
> sort. Is there something I'm missing?

I've pushed this patch after tweaking this part in the commit message.
Thank you both for your reviews.

Thanks
Richard



pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Inconsistent RestrictInfo serial numbers
Next
From: Richard Guo
Date:
Subject: Re: Allow pushdown of HAVING clauses with grouping sets