File tree 2 files changed +12
-12
lines changed
2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -2876,26 +2876,26 @@ RESET enable_incremental_sort;
2876
2876
DROP TABLE btg;
2877
2877
-- The case, when scanning sort order correspond to aggregate sort order but
2878
2878
-- can not be found in the group-by list
2879
- CREATE TABLE t1 (c1 int PRIMARY KEY, c2 int);
2880
- CREATE UNIQUE INDEX ON t1 (c2);
2879
+ CREATE TABLE agg_sort_order (c1 int PRIMARY KEY, c2 int);
2880
+ CREATE UNIQUE INDEX ON agg_sort_order (c2);
2881
2881
explain (costs off)
2882
2882
SELECT array_agg(c1 ORDER BY c2),c2
2883
- FROM t1 WHERE c2 < 100 GROUP BY c1 ORDER BY 2;
2884
- QUERY PLAN
2885
- --------------------------------------------------------
2883
+ FROM agg_sort_order WHERE c2 < 100 GROUP BY c1 ORDER BY 2;
2884
+ QUERY PLAN
2885
+ --------------------------------------------------------------------
2886
2886
Sort
2887
2887
Sort Key: c2
2888
2888
-> GroupAggregate
2889
2889
Group Key: c1
2890
2890
-> Sort
2891
2891
Sort Key: c1, c2
2892
- -> Bitmap Heap Scan on t1
2892
+ -> Bitmap Heap Scan on agg_sort_order
2893
2893
Recheck Cond: (c2 < 100)
2894
- -> Bitmap Index Scan on t1_c2_idx
2894
+ -> Bitmap Index Scan on agg_sort_order_c2_idx
2895
2895
Index Cond: (c2 < 100)
2896
2896
(10 rows)
2897
2897
2898
- DROP TABLE t1 CASCADE;
2898
+ DROP TABLE agg_sort_order CASCADE;
2899
2899
-- Check, that GROUP-BY reordering optimization can operate with pathkeys, built
2900
2900
-- by planner itself. For example, by MergeJoin.
2901
2901
SET enable_hashjoin = off;
Original file line number Diff line number Diff line change @@ -1233,12 +1233,12 @@ DROP TABLE btg;
1233
1233
1234
1234
-- The case, when scanning sort order correspond to aggregate sort order but
1235
1235
-- can not be found in the group-by list
1236
- CREATE TABLE t1 (c1 int PRIMARY KEY , c2 int );
1237
- CREATE UNIQUE INDEX ON t1 (c2);
1236
+ CREATE TABLE agg_sort_order (c1 int PRIMARY KEY , c2 int );
1237
+ CREATE UNIQUE INDEX ON agg_sort_order (c2);
1238
1238
explain (costs off)
1239
1239
SELECT array_agg(c1 ORDER BY c2),c2
1240
- FROM t1 WHERE c2 < 100 GROUP BY c1 ORDER BY 2 ;
1241
- DROP TABLE t1 CASCADE;
1240
+ FROM agg_sort_order WHERE c2 < 100 GROUP BY c1 ORDER BY 2 ;
1241
+ DROP TABLE agg_sort_order CASCADE;
1242
1242
1243
1243
-- Check, that GROUP-BY reordering optimization can operate with pathkeys, built
1244
1244
-- by planner itself. For example, by MergeJoin.
You can’t perform that action at this time.
0 commit comments