mirror of https://github.com/citusdata/citus.git
removing flakyness from test
parent
d5231c34ab
commit
76f68f47c4
|
@ -1870,7 +1870,8 @@ select colocationid,logicalrelid from pg_dist_partition where logicalrelid = 'so
|
||||||
|
|
||||||
SET client_min_messages TO DEBUG1;
|
SET client_min_messages TO DEBUG1;
|
||||||
-- Test 1 : tables are colocated AND query is multisharded AND Join On distributed column : should push down to workers.
|
-- Test 1 : tables are colocated AND query is multisharded AND Join On distributed column : should push down to workers.
|
||||||
EXPLAIN MERGE INTO target_pushdowntest t
|
EXPLAIN (costs off, timing off, summary off)
|
||||||
|
MERGE INTO target_pushdowntest t
|
||||||
USING source_pushdowntest s
|
USING source_pushdowntest s
|
||||||
ON t.id = s.id
|
ON t.id = s.id
|
||||||
WHEN NOT MATCHED THEN
|
WHEN NOT MATCHED THEN
|
||||||
|
@ -1883,57 +1884,58 @@ DEBUG: <Deparsed MERGE query: MERGE INTO merge_schema.target_pushdowntest_xxxxx
|
||||||
DEBUG: Creating MERGE router plan
|
DEBUG: Creating MERGE router plan
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
Custom Scan (Citus Adaptive) (cost=0.00..0.00 rows=0 width=0)
|
Custom Scan (Citus Adaptive)
|
||||||
Task Count: 4
|
Task Count: 4
|
||||||
Tasks Shown: All
|
Tasks Shown: All
|
||||||
-> Task
|
-> Task
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Merge on target_pushdowntest_4000068 t (cost=359.57..860.00 rows=0 width=0)
|
-> Merge on target_pushdowntest_4000068 t
|
||||||
-> Merge Left Join (cost=359.57..860.00 rows=32512 width=16)
|
-> Merge Left Join
|
||||||
Merge Cond: (s.id = t.id)
|
Merge Cond: (s.id = t.id)
|
||||||
-> Sort (cost=179.78..186.16 rows=2550 width=10)
|
-> Sort
|
||||||
Sort Key: s.id
|
Sort Key: s.id
|
||||||
-> Seq Scan on source_pushdowntest_4000064 s (cost=0.00..35.50 rows=2550 width=10)
|
-> Seq Scan on source_pushdowntest_4000064 s
|
||||||
-> Sort (cost=179.78..186.16 rows=2550 width=10)
|
-> Sort
|
||||||
Sort Key: t.id
|
Sort Key: t.id
|
||||||
-> Seq Scan on target_pushdowntest_4000068 t (cost=0.00..35.50 rows=2550 width=10)
|
-> Seq Scan on target_pushdowntest_4000068 t
|
||||||
-> Task
|
-> Task
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Merge on target_pushdowntest_4000069 t (cost=359.57..860.00 rows=0 width=0)
|
-> Merge on target_pushdowntest_4000069 t
|
||||||
-> Merge Left Join (cost=359.57..860.00 rows=32512 width=16)
|
-> Merge Left Join
|
||||||
Merge Cond: (s.id = t.id)
|
Merge Cond: (s.id = t.id)
|
||||||
-> Sort (cost=179.78..186.16 rows=2550 width=10)
|
-> Sort
|
||||||
Sort Key: s.id
|
Sort Key: s.id
|
||||||
-> Seq Scan on source_pushdowntest_4000065 s (cost=0.00..35.50 rows=2550 width=10)
|
-> Seq Scan on source_pushdowntest_4000065 s
|
||||||
-> Sort (cost=179.78..186.16 rows=2550 width=10)
|
-> Sort
|
||||||
Sort Key: t.id
|
Sort Key: t.id
|
||||||
-> Seq Scan on target_pushdowntest_4000069 t (cost=0.00..35.50 rows=2550 width=10)
|
-> Seq Scan on target_pushdowntest_4000069 t
|
||||||
-> Task
|
-> Task
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Merge on target_pushdowntest_4000070 t (cost=359.57..860.00 rows=0 width=0)
|
-> Merge on target_pushdowntest_4000070 t
|
||||||
-> Merge Left Join (cost=359.57..860.00 rows=32512 width=16)
|
-> Merge Left Join
|
||||||
Merge Cond: (s.id = t.id)
|
Merge Cond: (s.id = t.id)
|
||||||
-> Sort (cost=179.78..186.16 rows=2550 width=10)
|
-> Sort
|
||||||
Sort Key: s.id
|
Sort Key: s.id
|
||||||
-> Seq Scan on source_pushdowntest_4000066 s (cost=0.00..35.50 rows=2550 width=10)
|
-> Seq Scan on source_pushdowntest_4000066 s
|
||||||
-> Sort (cost=179.78..186.16 rows=2550 width=10)
|
-> Sort
|
||||||
Sort Key: t.id
|
Sort Key: t.id
|
||||||
-> Seq Scan on target_pushdowntest_4000070 t (cost=0.00..35.50 rows=2550 width=10)
|
-> Seq Scan on target_pushdowntest_4000070 t
|
||||||
-> Task
|
-> Task
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Merge on target_pushdowntest_4000071 t (cost=359.57..860.00 rows=0 width=0)
|
-> Merge on target_pushdowntest_4000071 t
|
||||||
-> Merge Left Join (cost=359.57..860.00 rows=32512 width=16)
|
-> Merge Left Join
|
||||||
Merge Cond: (s.id = t.id)
|
Merge Cond: (s.id = t.id)
|
||||||
-> Sort (cost=179.78..186.16 rows=2550 width=10)
|
-> Sort
|
||||||
Sort Key: s.id
|
Sort Key: s.id
|
||||||
-> Seq Scan on source_pushdowntest_4000067 s (cost=0.00..35.50 rows=2550 width=10)
|
-> Seq Scan on source_pushdowntest_4000067 s
|
||||||
-> Sort (cost=179.78..186.16 rows=2550 width=10)
|
-> Sort
|
||||||
Sort Key: t.id
|
Sort Key: t.id
|
||||||
-> Seq Scan on target_pushdowntest_4000071 t (cost=0.00..35.50 rows=2550 width=10)
|
-> Seq Scan on target_pushdowntest_4000071 t
|
||||||
(47 rows)
|
(47 rows)
|
||||||
|
|
||||||
-- Test 2 : tables are colocated AND source query is not multisharded : should push down to worker.
|
-- Test 2 : tables are colocated AND source query is not multisharded : should push down to worker.
|
||||||
EXPLAIN MERGE INTO target_pushdowntest t
|
EXPLAIN (costs off, timing off, summary off)
|
||||||
|
MERGE INTO target_pushdowntest t
|
||||||
USING (SELECT * from source_pushdowntest where id = 1) s
|
USING (SELECT * from source_pushdowntest where id = 1) s
|
||||||
on t.id = s.id
|
on t.id = s.id
|
||||||
WHEN NOT MATCHED THEN
|
WHEN NOT MATCHED THEN
|
||||||
|
@ -1943,23 +1945,24 @@ DEBUG: <Deparsed MERGE query: MERGE INTO merge_schema.target_pushdowntest_xxxxx
|
||||||
DEBUG: Creating MERGE router plan
|
DEBUG: Creating MERGE router plan
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
Custom Scan (Citus Adaptive) (cost=0.00..0.00 rows=0 width=0)
|
Custom Scan (Citus Adaptive)
|
||||||
Task Count: 1
|
Task Count: 1
|
||||||
Tasks Shown: All
|
Tasks Shown: All
|
||||||
-> Task
|
-> Task
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Merge on target_pushdowntest_4000068 t (cost=0.00..85.89 rows=0 width=0)
|
-> Merge on target_pushdowntest_4000068 t
|
||||||
-> Nested Loop Left Join (cost=0.00..85.89 rows=169 width=16)
|
-> Nested Loop Left Join
|
||||||
-> Seq Scan on source_pushdowntest_4000064 source_pushdowntest (cost=0.00..41.88 rows=13 width=10)
|
-> Seq Scan on source_pushdowntest_4000064 source_pushdowntest
|
||||||
Filter: (id = 1)
|
Filter: (id = 1)
|
||||||
-> Materialize (cost=0.00..41.94 rows=13 width=10)
|
-> Materialize
|
||||||
-> Seq Scan on target_pushdowntest_4000068 t (cost=0.00..41.88 rows=13 width=10)
|
-> Seq Scan on target_pushdowntest_4000068 t
|
||||||
Filter: (id = 1)
|
Filter: (id = 1)
|
||||||
(12 rows)
|
(12 rows)
|
||||||
|
|
||||||
-- Test 3 : tables are colocated source query is single sharded but not using source distributed column in insertion. let's not pushdown.
|
-- Test 3 : tables are colocated source query is single sharded but not using source distributed column in insertion. let's not pushdown.
|
||||||
INSERT INTO source_pushdowntest (id) VALUES (3);
|
INSERT INTO source_pushdowntest (id) VALUES (3);
|
||||||
EXPLAIN MERGE INTO target_pushdowntest t
|
EXPLAIN (costs off, timing off, summary off)
|
||||||
|
MERGE INTO target_pushdowntest t
|
||||||
USING (SELECT 1 as somekey, id from source_pushdowntest where id = 1) s
|
USING (SELECT 1 as somekey, id from source_pushdowntest where id = 1) s
|
||||||
on t.id = s.somekey
|
on t.id = s.somekey
|
||||||
WHEN NOT MATCHED THEN
|
WHEN NOT MATCHED THEN
|
||||||
|
@ -1971,14 +1974,14 @@ DEBUG: Creating MERGE repartition plan
|
||||||
DEBUG: Using column - index:0 from the source list to redistribute
|
DEBUG: Using column - index:0 from the source list to redistribute
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
Custom Scan (Citus MERGE INTO ...) (cost=0.00..0.00 rows=0 width=0)
|
Custom Scan (Citus MERGE INTO ...)
|
||||||
MERGE INTO target_pushdowntest method: pull to coordinator
|
MERGE INTO target_pushdowntest method: pull to coordinator
|
||||||
-> Custom Scan (Citus Adaptive) (cost=0.00..0.00 rows=0 width=0)
|
-> Custom Scan (Citus Adaptive)
|
||||||
Task Count: 1
|
Task Count: 1
|
||||||
Tasks Shown: All
|
Tasks Shown: All
|
||||||
-> Task
|
-> Task
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Seq Scan on source_pushdowntest_4000064 source_pushdowntest (cost=0.00..41.88 rows=13 width=8)
|
-> Seq Scan on source_pushdowntest_4000064 source_pushdowntest
|
||||||
Filter: (id = 1)
|
Filter: (id = 1)
|
||||||
(9 rows)
|
(9 rows)
|
||||||
|
|
||||||
|
|
|
@ -1223,7 +1223,8 @@ select colocationid,logicalrelid from pg_dist_partition where logicalrelid = 'so
|
||||||
SET client_min_messages TO DEBUG1;
|
SET client_min_messages TO DEBUG1;
|
||||||
-- Test 1 : tables are colocated AND query is multisharded AND Join On distributed column : should push down to workers.
|
-- Test 1 : tables are colocated AND query is multisharded AND Join On distributed column : should push down to workers.
|
||||||
|
|
||||||
EXPLAIN MERGE INTO target_pushdowntest t
|
EXPLAIN (costs off, timing off, summary off)
|
||||||
|
MERGE INTO target_pushdowntest t
|
||||||
USING source_pushdowntest s
|
USING source_pushdowntest s
|
||||||
ON t.id = s.id
|
ON t.id = s.id
|
||||||
WHEN NOT MATCHED THEN
|
WHEN NOT MATCHED THEN
|
||||||
|
@ -1232,7 +1233,8 @@ WHEN NOT MATCHED THEN
|
||||||
|
|
||||||
-- Test 2 : tables are colocated AND source query is not multisharded : should push down to worker.
|
-- Test 2 : tables are colocated AND source query is not multisharded : should push down to worker.
|
||||||
|
|
||||||
EXPLAIN MERGE INTO target_pushdowntest t
|
EXPLAIN (costs off, timing off, summary off)
|
||||||
|
MERGE INTO target_pushdowntest t
|
||||||
USING (SELECT * from source_pushdowntest where id = 1) s
|
USING (SELECT * from source_pushdowntest where id = 1) s
|
||||||
on t.id = s.id
|
on t.id = s.id
|
||||||
WHEN NOT MATCHED THEN
|
WHEN NOT MATCHED THEN
|
||||||
|
@ -1243,7 +1245,8 @@ WHEN NOT MATCHED THEN
|
||||||
-- Test 3 : tables are colocated source query is single sharded but not using source distributed column in insertion. let's not pushdown.
|
-- Test 3 : tables are colocated source query is single sharded but not using source distributed column in insertion. let's not pushdown.
|
||||||
INSERT INTO source_pushdowntest (id) VALUES (3);
|
INSERT INTO source_pushdowntest (id) VALUES (3);
|
||||||
|
|
||||||
EXPLAIN MERGE INTO target_pushdowntest t
|
EXPLAIN (costs off, timing off, summary off)
|
||||||
|
MERGE INTO target_pushdowntest t
|
||||||
USING (SELECT 1 as somekey, id from source_pushdowntest where id = 1) s
|
USING (SELECT 1 as somekey, id from source_pushdowntest where id = 1) s
|
||||||
on t.id = s.somekey
|
on t.id = s.somekey
|
||||||
WHEN NOT MATCHED THEN
|
WHEN NOT MATCHED THEN
|
||||||
|
|
Loading…
Reference in New Issue