(4 rows)
EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.val = t2.val;
- QUERY PLAN
--------------------------------------------
- Merge Join
- Merge Cond: (t2.val = t1.val)
- -> Index Scan using t2_val on t2
- -> Materialize
- -> Index Scan using t1_val on t1
+ QUERY PLAN
+--------------------------------
+ Hash Join
+ Hash Cond: (t2.val = t1.val)
+ -> Seq Scan on t2
+ -> Hash
+ -> Seq Scan on t1
(5 rows)
LOAD 'pg_hint_plan';
(4 rows)
EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.val = t2.val;
- QUERY PLAN
--------------------------------------------
- Merge Join
- Merge Cond: (t2.val = t1.val)
- -> Index Scan using t2_val on t2
- -> Materialize
- -> Index Scan using t1_val on t1
+ QUERY PLAN
+--------------------------------
+ Hash Join
+ Hash Cond: (t2.val = t1.val)
+ -> Seq Scan on t2
+ -> Hash
+ -> Seq Scan on t1
(5 rows)
/*+ Test (t1 t2) */
\o
\! sql/maskout.sh results/ut-fdw.tmpout
- Nested Loop (cost=xxx rows=1 width=xxx)
+ Nested Loop (cost=xxx..xxx rows=1 width=xxx)
Join Filter: (ft_1.id = t1.c1)
- -> Nested Loop (cost=xxx rows=1 width=xxx)
+ -> Nested Loop (cost=xxx..xxx rows=1 width=xxx)
Join Filter: (ft_1.id = ft_2.id)
- -> Foreign Scan on ft1 ft_1 (cost=xxx rows=1 width=xxx)
+ -> Foreign Scan on ft1 ft_1 (cost=xxx..xxx rows=1 width=xxx)
Foreign File: @abs_srcdir@/data/data.csv
Foreign File Size: 42 b
- -> Foreign Scan on ft1 ft_2 (cost=xxx rows=1 width=xxx)
+ -> Foreign Scan on ft1 ft_2 (cost=xxx..xxx rows=1 width=xxx)
Foreign File: @abs_srcdir@/data/data.csv
Foreign File Size: 42 b
- -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
+ -> Index Scan using t1_i1 on t1 (cost=xxx..xxx rows=1 width=xxx)
Index Cond: (c1 = ft_2.id)
\! rm results/ut-fdw.tmpout