You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to stabilize EXPLAIN output in partition_check test.
Commit 7d8ac98 adjusted these
tests in the hope of preserving the plan shape, but I failed to
notice that the three partitions were, on my local machine, choosing
two different plan shapes. This is probably related to the fact
that all three tables have exactly the same row count. Try to
improve the situation by making pht1_e about half as large as
the other two.
Per Tom Lane and the buildfarm.
Discussion: http://postgr.es/m/25380.1519277713@sss.pgh.pa.us
Copy file name to clipboardExpand all lines: src/test/regress/expected/partition_join.out
+26-32
Original file line number
Diff line number
Diff line change
@@ -1285,13 +1285,13 @@ CREATE TABLE pht1_e (a int, b int, c text) PARTITION BY HASH(ltrim(c, 'A'));
1285
1285
CREATE TABLE pht1_e_p1 PARTITION OF pht1_e FOR VALUES WITH (MODULUS 3, REMAINDER 0);
1286
1286
CREATE TABLE pht1_e_p2 PARTITION OF pht1_e FOR VALUES WITH (MODULUS 3, REMAINDER 1);
1287
1287
CREATE TABLE pht1_e_p3 PARTITION OF pht1_e FOR VALUES WITH (MODULUS 3, REMAINDER 2);
1288
-
INSERT INTO pht1_e SELECT i, i, 'A' || to_char(i/50, 'FM0000') FROM generate_series(0, 599, 2) i;
1288
+
INSERT INTO pht1_e SELECT i, i, 'A' || to_char(i/50, 'FM0000') FROM generate_series(0, 299, 2) i;
1289
1289
ANALYZE pht1_e;
1290
1290
-- test partition matching with N-way join
1291
1291
EXPLAIN (COSTS OFF)
1292
1292
SELECT avg(t1.a), avg(t2.b), avg(t3.a + t3.b), t1.c, t2.c, t3.c FROM pht1 t1, pht2 t2, pht1_e t3 WHERE t1.b = t2.b AND t1.c = t2.c AND ltrim(t3.c, 'A') = t1.c GROUP BY t1.c, t2.c, t3.c ORDER BY t1.c, t2.c, t3.c;
Hash Cond: ((t1_1.b = t2_1.b) AND (t1_1.c = t2_1.c))
1314
+
-> Seq Scan on pht1_p2 t1_1
1315
+
-> Hash
1316
+
-> Seq Scan on pht2_p2 t2_1
1313
1317
-> Hash
1314
-
-> Hash Join
1315
-
Hash Cond: ((t1_1.b = t2_1.b) AND (t1_1.c = t2_1.c))
1316
-
-> Seq Scan on pht1_p2 t1_1
1317
-
-> Hash
1318
-
-> Seq Scan on pht2_p2 t2_1
1318
+
-> Seq Scan on pht1_e_p2 t3_1
1319
1319
-> Hash Join
1320
-
Hash Cond: (ltrim(t3_2.c, 'A'::text) = t1_2.c)
1321
-
-> Seq Scan on pht1_e_p3 t3_2
1320
+
Hash Cond: (t1_2.c = ltrim(t3_2.c, 'A'::text))
1321
+
-> Hash Join
1322
+
Hash Cond: ((t1_2.b = t2_2.b) AND (t1_2.c = t2_2.c))
1323
+
-> Seq Scan on pht1_p3 t1_2
1324
+
-> Hash
1325
+
-> Seq Scan on pht2_p3 t2_2
1322
1326
-> Hash
1323
-
-> Hash Join
1324
-
Hash Cond: ((t1_2.b = t2_2.b) AND (t1_2.c = t2_2.c))
1325
-
-> Seq Scan on pht1_p3 t1_2
1326
-
-> Hash
1327
-
-> Seq Scan on pht2_p3 t2_2
1327
+
-> Seq Scan on pht1_e_p3 t3_2
1328
1328
(33 rows)
1329
1329
1330
1330
SELECT avg(t1.a), avg(t2.b), avg(t3.a + t3.b), t1.c, t2.c, t3.c FROM pht1 t1, pht2 t2, pht1_e t3 WHERE t1.b = t2.b AND t1.c = t2.c AND ltrim(t3.c, 'A') = t1.c GROUP BY t1.c, t2.c, t3.c ORDER BY t1.c, t2.c, t3.c;
0 commit comments