@@ -4872,30 +4872,29 @@ analyze bar;
48724872set optimizer_segments = 3;
48734873set optimizer_nestloop_factor = 1.0;
48744874explain select foo_p.b, foo_p.t from foo_p left outer join bar on foo_p.a = bar.k where foo_p.t is not null and foo_p.a = (array[1])[1];
4875- QUERY PLAN
4876- --------------------------------------------------------------------------------------------------
4877- Gather Motion 3:1 (slice1; segments: 3) (cost=10.28..366.35 rows=13416 width=31)
4878- -> Hash Right Join (cost=10.28..187.47 rows=4472 width=31)
4879- Hash Cond: (bar.k = foo_p.a)
4880- -> Broadcast Motion 3:3 (slice2; segments: 3) (cost=0.00..126.56 rows=2236 width=4)
4881- -> Seq Scan on bar (cost=0.00..96.75 rows=745 width=4)
4882- Filter: (k = 1)
4883- -> Hash (cost=10.21..10.21 rows=6 width=35)
4884- -> Append (cost=0.00..10.21 rows=6 width=35)
4885- -> Seq Scan on foo_p_1_prt_2 foo_p_1 (cost=0.00..1.83 rows=1 width=34)
4886- Filter: ((t IS NOT NULL) AND (a = 1))
4887- -> Seq Scan on foo_p_1_prt_3 foo_p_2 (cost=0.00..1.83 rows=1 width=34)
4888- Filter: ((t IS NOT NULL) AND (a = 1))
4889- -> Seq Scan on foo_p_1_prt_4 foo_p_3 (cost=0.00..1.83 rows=1 width=34)
4890- Filter: ((t IS NOT NULL) AND (a = 1))
4891- -> Seq Scan on foo_p_1_prt_5 foo_p_4 (cost=0.00..1.83 rows=1 width=34)
4892- Filter: ((t IS NOT NULL) AND (a = 1))
4893- -> Seq Scan on foo_p_1_prt_6 foo_p_5 (cost=0.00..1.83 rows=1 width=34)
4894- Filter: ((t IS NOT NULL) AND (a = 1))
4895- -> Seq Scan on foo_p_1_prt_other foo_p_6 (cost=0.00..1.01 rows=1 width=40)
4896- Filter: ((t IS NOT NULL) AND (a = 1))
4875+ QUERY PLAN
4876+ ------------------------------------------------------------------------------------------------------
4877+ Gather Motion 3:1 (slice1; segments: 3) (cost=10000000000.00..10000001082.63 rows=13416 width=31)
4878+ -> Nested Loop Left Join (cost=10000000000.00..10000000903.75 rows=4472 width=31)
4879+ -> Append (cost=0.00..10.21 rows=6 width=35)
4880+ -> Seq Scan on foo_p_1_prt_2 foo_p_1 (cost=0.00..1.83 rows=1 width=34)
4881+ Filter: ((t IS NOT NULL) AND (a = 1))
4882+ -> Seq Scan on foo_p_1_prt_3 foo_p_2 (cost=0.00..1.83 rows=1 width=34)
4883+ Filter: ((t IS NOT NULL) AND (a = 1))
4884+ -> Seq Scan on foo_p_1_prt_4 foo_p_3 (cost=0.00..1.83 rows=1 width=34)
4885+ Filter: ((t IS NOT NULL) AND (a = 1))
4886+ -> Seq Scan on foo_p_1_prt_5 foo_p_4 (cost=0.00..1.83 rows=1 width=34)
4887+ Filter: ((t IS NOT NULL) AND (a = 1))
4888+ -> Seq Scan on foo_p_1_prt_6 foo_p_5 (cost=0.00..1.83 rows=1 width=34)
4889+ Filter: ((t IS NOT NULL) AND (a = 1))
4890+ -> Seq Scan on foo_p_1_prt_other foo_p_6 (cost=0.00..1.01 rows=1 width=40)
4891+ Filter: ((t IS NOT NULL) AND (a = 1))
4892+ -> Materialize (cost=0.00..137.74 rows=2236 width=4)
4893+ -> Broadcast Motion 3:3 (slice2; segments: 3) (cost=0.00..126.56 rows=2236 width=4)
4894+ -> Seq Scan on bar (cost=0.00..96.75 rows=745 width=4)
4895+ Filter: (k = 1)
48974896 Optimizer: Postgres query optimizer
4898- (21 rows)
4897+ (20 rows)
48994898
49004899reset optimizer_segments;
49014900drop table if exists foo_p;
0 commit comments