Re: Fix up grouping sets reorder

From: Andres Freund <andres(at)anarazel(dot)de>
To: Richard Guo <riguo(at)pivotal(dot)io>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix up grouping sets reorder
Date: 2019-06-17 17:33:24
Message-ID: 20190617173324.3nmv4ln6gtkxvkna@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2019-06-17 17:23:11 +0800, Richard Guo wrote:
> During the reorder of grouping sets into correct prefix order, if only
> one aggregation pass is needed, we follow the order of the ORDER BY
> clause to the extent possible, to minimize the chance that we add
> unnecessary sorts. This is implemented in preprocess_grouping_sets -->
> reorder_grouping_sets.

Thanks for finding!

Andrew, could you take a look at that?

- Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-06-17 17:35:46 Re: initial random incompatibility
Previous Message Andres Freund 2019-06-17 17:28:19 Re: assertion at postmaster start