Re: Fix up grouping sets reorder
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Richard Guo <riguo@pivotal.io>, Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-06-17T17:33:24Z
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
Commits
-
Repair logic for reordering grouping sets optimization.
- 4a36c77156f2 9.5.19 landed
- 793eb94e3138 9.6.15 landed
- a1637caee9c7 10.10 landed
- 05dc5f4767e1 11.5 landed
- da53be23d1c5 12.0 landed