-> Merge Join (cost=xxx rows=1000 width=xxx)
Merge Cond: (t1.c1 = t3.c1)
-> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
- -> Index Scan using t3_i1 on t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Scan using t3_i1 on t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: t2.c1
-> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=1000 width=xxx)
Merge Cond: (t1.c1 = t3.c1)
-> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
- -> Index Scan using t3_i1 on t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Scan using t3_i1 on t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: t2.c1
-> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
\! sql/maskout.sh results/ut-R.tmpout
QUERY PLAN
-----------------------------------------------------------------------
- Hash Join (cost=xxx rows=1100 width=xxx)
+ Hash Join (cost=xxx rows=1130 width=xxx)
Hash Cond: (t1.c1 = t2.c1)
- -> Seq Scan on ul1 t1 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on ul1 t2 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on ul1 t1 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on ul1 t2 (cost=xxx rows=1130 width=xxx)
(5 rows)
\o results/ut-R.tmpout
-----------------------------------------------------------------------
Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (t1.c1 = t2.c1)
- -> Seq Scan on ul1 t1 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on ul1 t2 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on ul1 t1 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on ul1 t2 (cost=xxx rows=1130 width=xxx)
(5 rows)
-- No. R-1-6-4
\! sql/maskout.sh results/ut-R.tmpout
QUERY PLAN
-----------------------------------------------------------------------
- Hash Join (cost=xxx rows=1100 width=xxx)
+ Hash Join (cost=xxx rows=1130 width=xxx)
Hash Cond: (t1.c1 = t2.c1)
- -> Seq Scan on tm1 t1 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on tm1 t2 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on tm1 t1 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on tm1 t2 (cost=xxx rows=1130 width=xxx)
(5 rows)
\o results/ut-R.tmpout
-----------------------------------------------------------------------
Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (t1.c1 = t2.c1)
- -> Seq Scan on tm1 t1 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on tm1 t2 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on tm1 t1 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on tm1 t2 (cost=xxx rows=1130 width=xxx)
(5 rows)
-- No. R-1-6-5
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Nested Loop (cost=xxx rows=100 width=xxx)
-> Hash Join (cost=xxx rows=1000 width=xxx)
Hash Cond: (b2t3.c1 = b2t1.c1)
- -> Merge Join (cost=xxx rows=1100 width=xxx)
+ -> Merge Join (cost=xxx rows=1130 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1000 width=xxx)
-> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
Join Filter: (bmt1.c1 = bmt4.c1)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (bmt3.c1 = bmt1.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (bmt1.c1 = bmt2.c1)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b2t1.c1)
-> Nested Loop (cost=xxx rows=1 width=xxx)
Join Filter: (bmt1.c1 = bmt4.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt3.c1 = bmt1.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (bmt1.c1 = bmt2.c1)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Nested Loop (cost=xxx rows=100 width=xxx)
-> Hash Join (cost=xxx rows=1000 width=xxx)
Hash Cond: (b2t3.c1 = b2t1.c1)
- -> Merge Join (cost=xxx rows=1100 width=xxx)
+ -> Merge Join (cost=xxx rows=1130 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1000 width=xxx)
-> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1000 width=xxx)
Merge Cond: (b3t1.c1 = b3t4.c1)
-> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
-> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
Join Filter: (bmt1.c1 = bmt4.c1)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (bmt3.c1 = bmt1.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (bmt1.c1 = bmt2.c1)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b2t1.c1)
InitPlan 3 (returns $5)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b3t1.c1 = b3t4.c1)
-> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
-> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
Join Filter: (bmt1.c1 = bmt4.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt3.c1 = bmt1.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (bmt1.c1 = bmt2.c1)
Sort Key: bmt2.c1
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (bmt3.c1 = bmt2.c1)
- -> Hash Join (cost=xxx rows=1100 width=xxx)
+ -> Hash Join (cost=xxx rows=1130 width=xxx)
Hash Cond: (bmt3.c1 = bmt4.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
(15 rows)
-> Nested Loop (cost=xxx rows=1 width=xxx)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt3.c1 = bmt4.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = bmt3.c1)
-> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
Sort Key: bmt2.c1
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (bmt3.c1 = bmt2.c1)
- -> Hash Join (cost=xxx rows=1100 width=xxx)
+ -> Hash Join (cost=xxx rows=1130 width=xxx)
Hash Cond: (bmt3.c1 = bmt4.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
(15 rows)
-> Nested Loop (cost=xxx rows=1 width=xxx)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt3.c1 = bmt4.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = bmt3.c1)
-> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Nested Loop (cost=xxx rows=100 width=xxx)
-> Hash Join (cost=xxx rows=1000 width=xxx)
Hash Cond: (b2t3.c1 = b2t1.c1)
- -> Merge Join (cost=xxx rows=1100 width=xxx)
+ -> Merge Join (cost=xxx rows=1130 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1000 width=xxx)
-> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
Join Filter: (bmt1.c1 = bmt4.c1)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (bmt3.c1 = bmt1.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (bmt1.c1 = bmt2.c1)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b2t1.c1)
-> Nested Loop (cost=xxx rows=1 width=xxx)
Join Filter: (bmt1.c1 = bmt4.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt3.c1 = bmt1.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (bmt1.c1 = bmt2.c1)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Nested Loop (cost=xxx rows=100 width=xxx)
-> Hash Join (cost=xxx rows=1000 width=xxx)
Hash Cond: (b2t3.c1 = b2t1.c1)
- -> Merge Join (cost=xxx rows=1100 width=xxx)
+ -> Merge Join (cost=xxx rows=1130 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1000 width=xxx)
-> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1000 width=xxx)
Merge Cond: (b3t1.c1 = b3t4.c1)
-> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
-> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
Join Filter: (bmt1.c1 = bmt4.c1)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (bmt3.c1 = bmt1.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (bmt1.c1 = bmt2.c1)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b2t1.c1)
InitPlan 3 (returns $5)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b3t1.c1 = b3t4.c1)
-> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
-> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
Join Filter: (bmt1.c1 = bmt4.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt3.c1 = bmt1.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (bmt1.c1 = bmt2.c1)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Nested Loop (cost=xxx rows=100 width=xxx)
-> Hash Join (cost=xxx rows=1000 width=xxx)
Hash Cond: (b2t3.c1 = b2t1.c1)
- -> Merge Join (cost=xxx rows=1100 width=xxx)
+ -> Merge Join (cost=xxx rows=1130 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1000 width=xxx)
-> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b2t1.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt4.c1 = bmt1.c1)
- -> Seq Scan on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (bmt3.c1 = bmt1.c1)
- -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=1 width=xxx)
Sort Key: bmt1.c1
-> Nested Loop (cost=xxx rows=1 width=xxx)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b2t1.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt4.c1 = bmt1.c1)
- -> Seq Scan on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (bmt3.c1 = bmt1.c1)
- -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=1 width=xxx)
Sort Key: bmt1.c1
-> Nested Loop (cost=xxx rows=1 width=xxx)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Nested Loop (cost=xxx rows=100 width=xxx)
-> Hash Join (cost=xxx rows=1000 width=xxx)
Hash Cond: (b2t3.c1 = b2t1.c1)
- -> Merge Join (cost=xxx rows=1100 width=xxx)
+ -> Merge Join (cost=xxx rows=1130 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1000 width=xxx)
-> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1000 width=xxx)
Merge Cond: (b3t1.c1 = b3t4.c1)
-> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
-> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
Join Filter: (bmt1.c1 = bmt4.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt3.c1 = bmt1.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (bmt1.c1 = bmt2.c1)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (b1t4.c1 = b1t2.c1)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b1t3.c1 = b1t2.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b2t3.c1 = b2t4.c1)
- -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b2t1.c1)
CTE c3
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b3t1.c1 = b3t4.c1)
-> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
-> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
Join Filter: (bmt1.c1 = bmt4.c1)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt3.c1 = bmt1.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (bmt1.c1 = bmt2.c1)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b1t2.c1
-> Nested Loop (cost=xxx rows=100 width=xxx)
- -> Hash Join (cost=xxx rows=1100 width=xxx)
+ -> Hash Join (cost=xxx rows=1130 width=xxx)
Hash Cond: (b1t3.c1 = b1t4.c1)
- -> Seq Scan on t3 b1t3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 b1t3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b1t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b1t3.c1)
InitPlan 2 (returns $3)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b2t2.c1
-> Nested Loop (cost=xxx rows=100 width=xxx)
- -> Hash Join (cost=xxx rows=1100 width=xxx)
+ -> Hash Join (cost=xxx rows=1130 width=xxx)
Hash Cond: (b2t3.c1 = b2t4.c1)
- -> Seq Scan on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b2t3.c1)
InitPlan 3 (returns $5)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: b3t2.c1
-> Nested Loop (cost=xxx rows=100 width=xxx)
- -> Hash Join (cost=xxx rows=1100 width=xxx)
+ -> Hash Join (cost=xxx rows=1130 width=xxx)
Hash Cond: (b3t3.c1 = b3t4.c1)
- -> Seq Scan on t3 b3t3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 b3t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 b3t3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 b3t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b3t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b3t3.c1)
-> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
-> Nested Loop (cost=xxx rows=100 width=xxx)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (bmt3.c1 = bmt4.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (bmt4.c1 = c1.c1)
- -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: c1.c1
-> CTE Scan on c1 (cost=xxx rows=100 width=xxx)
-> Nested Loop (cost=xxx rows=1 width=xxx)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (b1t3.c1 = b1t4.c1)
- -> Seq Scan on t3 b1t3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 b1t3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b1t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b1t3.c1)
InitPlan 2 (returns $3)
-> Nested Loop (cost=xxx rows=1 width=xxx)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (b2t3.c1 = b2t4.c1)
- -> Seq Scan on t3 b2t3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 b2t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 b2t3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 b2t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b2t3.c1)
InitPlan 3 (returns $5)
-> Nested Loop (cost=xxx rows=1 width=xxx)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (b3t3.c1 = b3t4.c1)
- -> Seq Scan on t3 b3t3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 b3t4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 b3t3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 b3t4 (cost=xxx rows=1130 width=xxx)
-> Index Only Scan using t2_i1 on t2 b3t2 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = b3t3.c1)
-> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
-> Nested Loop (cost=xxx rows=1 width=xxx)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt3.c1 = bmt4.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (bmt4.c1 = c1.c1)
- -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=1 width=xxx)
Sort Key: c1.c1
-> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
Join Filter: (b1t2.c1 = b1t1.c1)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (b1t3.c1 = b1t2.c1)
- -> Merge Join (cost=xxx rows=1100 width=xxx)
+ -> Merge Join (cost=xxx rows=1130 width=xxx)
Merge Cond: (b1t3.c1 = b1t4.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
-> Nested Loop (cost=xxx rows=100 width=xxx)
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (bmt3.c1 = bmt4.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Merge Join (cost=xxx rows=100 width=xxx)
Merge Cond: (bmt4.c1 = c1.c1)
- -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: c1.c1
-> CTE Scan on c1 (cost=xxx rows=100 width=xxx)
Hash Cond: (b1t3.c1 = b1t2.c1)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (b1t3.c1 = b1t4.c1)
- -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1100 width=xxx)
- -> Index Only Scan using t4_i1 on t4 b1t4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 b1t4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
-> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
-> Nested Loop (cost=xxx rows=1 width=xxx)
-> Hash Join (cost=xxx rows=1 width=xxx)
Hash Cond: (bmt3.c1 = bmt4.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=1 width=xxx)
-> Merge Join (cost=xxx rows=1 width=xxx)
Merge Cond: (bmt4.c1 = c1.c1)
- -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=1 width=xxx)
Sort Key: c1.c1
-> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
----
-- No. R-2-4-1
\o results/ut-R.tmpout
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
\o
\! sql/maskout.sh results/ut-R.tmpout
QUERY PLAN
--------------------------------------------------------------------------------
Nested Loop (cost=xxx rows=1 width=xxx)
- -> Hash Join (cost=xxx rows=1 width=xxx)
+ -> Hash Join (cost=xxx rows=2 width=xxx)
Hash Cond: (t2.c1 = "*VALUES*".column1)
-> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
- -> Hash (cost=xxx rows=1 width=xxx)
- -> Values Scan on "*VALUES*" (cost=xxx rows=1 width=xxx)
+ -> Hash (cost=xxx rows=2 width=xxx)
+ -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
-> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = t2.c1)
(8 rows)
\o results/ut-R.tmpout
/*+ Leading(t3 t1 t2) Rows(t3 t1 #2)Rows(t3 t1 t2 #2)*/
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
LOG: pg_hint_plan:
used hint:
not used hint:
QUERY PLAN
--------------------------------------------------------------------------------
Nested Loop (cost=xxx rows=1 width=xxx)
- -> Hash Join (cost=xxx rows=1 width=xxx)
+ -> Hash Join (cost=xxx rows=2 width=xxx)
Hash Cond: (t2.c1 = "*VALUES*".column1)
-> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
- -> Hash (cost=xxx rows=1 width=xxx)
- -> Values Scan on "*VALUES*" (cost=xxx rows=1 width=xxx)
+ -> Hash (cost=xxx rows=2 width=xxx)
+ -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
-> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = t2.c1)
(8 rows)
\o results/ut-R.tmpout
/*+ Leading(*VALUES* t1 t2) Rows(*VALUES* t1 #2)Rows(*VALUES* t1 t2 #20)*/
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
LOG: pg_hint_plan:
used hint:
Leading(*VALUES* t1 t2)
-----------------------------------------------------------------------------
Nested Loop (cost=xxx rows=20 width=xxx)
-> Nested Loop (cost=xxx rows=2 width=xxx)
- -> Values Scan on "*VALUES*" (cost=xxx rows=1 width=xxx)
+ -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
-> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
Index Cond: (c1 = "*VALUES*".column1)
-> Index Scan using t2_i1 on t2 (cost=xxx rows=1 width=xxx)
-- No. R-2-4-2
\o results/ut-R.tmpout
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
\o
\! sql/maskout.sh results/ut-R.tmpout
QUERY PLAN
--------------------------------------------------------------------------------------
Nested Loop (cost=xxx rows=1 width=xxx)
- Join Filter: (t1.c1 = "*VALUES*_1".column1)
-> Nested Loop (cost=xxx rows=1 width=xxx)
- -> Hash Join (cost=xxx rows=1 width=xxx)
+ Join Filter: (t2.c1 = "*VALUES*_1".column1)
+ -> Hash Join (cost=xxx rows=2 width=xxx)
Hash Cond: (t2.c1 = "*VALUES*".column1)
-> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
- -> Hash (cost=xxx rows=1 width=xxx)
- -> Values Scan on "*VALUES*" (cost=xxx rows=1 width=xxx)
- -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
- Index Cond: (c1 = t2.c1)
- -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
-(11 rows)
+ -> Hash (cost=xxx rows=2 width=xxx)
+ -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
+ -> Materialize (cost=xxx rows=2 width=xxx)
+ -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
+ -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
+ Index Cond: (c1 = t2.c1)
+(12 rows)
\o results/ut-R.tmpout
/*+ Leading(t4 t3 t2 t1) Rows(t4 t3 #2) Rows(t4 t3 t2 #2)Rows(t4 t3 t2 t1 #2)*/
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
LOG: pg_hint_plan:
used hint:
not used hint:
QUERY PLAN
--------------------------------------------------------------------------------------
Nested Loop (cost=xxx rows=1 width=xxx)
- Join Filter: (t1.c1 = "*VALUES*_1".column1)
-> Nested Loop (cost=xxx rows=1 width=xxx)
- -> Hash Join (cost=xxx rows=1 width=xxx)
+ Join Filter: (t2.c1 = "*VALUES*_1".column1)
+ -> Hash Join (cost=xxx rows=2 width=xxx)
Hash Cond: (t2.c1 = "*VALUES*".column1)
-> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
- -> Hash (cost=xxx rows=1 width=xxx)
- -> Values Scan on "*VALUES*" (cost=xxx rows=1 width=xxx)
- -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
- Index Cond: (c1 = t2.c1)
- -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
-(11 rows)
+ -> Hash (cost=xxx rows=2 width=xxx)
+ -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
+ -> Materialize (cost=xxx rows=2 width=xxx)
+ -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
+ -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
+ Index Cond: (c1 = t2.c1)
+(12 rows)
\o results/ut-R.tmpout
/*+ Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)*/
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
DETAIL: Relation name "*VALUES*" is ambiguous.
INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 t1 #2)"
QUERY PLAN
--------------------------------------------------------------------------------------
Nested Loop (cost=xxx rows=1 width=xxx)
- Join Filter: (t1.c1 = "*VALUES*_1".column1)
-> Nested Loop (cost=xxx rows=1 width=xxx)
- -> Hash Join (cost=xxx rows=1 width=xxx)
+ Join Filter: (t2.c1 = "*VALUES*_1".column1)
+ -> Hash Join (cost=xxx rows=2 width=xxx)
Hash Cond: (t2.c1 = "*VALUES*".column1)
-> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
- -> Hash (cost=xxx rows=1 width=xxx)
- -> Values Scan on "*VALUES*" (cost=xxx rows=1 width=xxx)
- -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
- Index Cond: (c1 = t2.c1)
- -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
-(11 rows)
+ -> Hash (cost=xxx rows=2 width=xxx)
+ -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
+ -> Materialize (cost=xxx rows=2 width=xxx)
+ -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
+ -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
+ Index Cond: (c1 = t2.c1)
+(12 rows)
----
---- No. R-2-5
-> Merge Join (cost=xxx rows=1000 width=xxx)
Merge Cond: (bmt1.c1 = bmt3.c1)
-> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
- -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: bmt2.c1
-> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
Sort Key: bmt2.c1
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (bmt3.c1 = bmt2.c1)
- -> Hash Join (cost=xxx rows=1100 width=xxx)
+ -> Hash Join (cost=xxx rows=1130 width=xxx)
Hash Cond: (bmt3.c1 = bmt4.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
(14 rows)
-> Merge Join (cost=xxx rows=1000 width=xxx)
Merge Cond: (bmt1.c1 = bmt3.c1)
-> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
- -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: bmt2.c1
-> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
Sort Key: bmt2.c1
-> Hash Join (cost=xxx rows=60 width=xxx)
Hash Cond: (bmt3.c1 = bmt2.c1)
- -> Hash Join (cost=xxx rows=660 width=xxx)
+ -> Hash Join (cost=xxx rows=678 width=xxx)
Hash Cond: (bmt3.c1 = bmt4.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
(14 rows)
-> Merge Join (cost=xxx rows=1000 width=xxx)
Merge Cond: (bmt1.c1 = bmt3.c1)
-> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
- -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1100 width=xxx)
+ -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
-> Sort (cost=xxx rows=100 width=xxx)
Sort Key: bmt2.c1
-> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
Sort Key: bmt2.c1
-> Hash Join (cost=xxx rows=100 width=xxx)
Hash Cond: (bmt3.c1 = bmt2.c1)
- -> Hash Join (cost=xxx rows=1100 width=xxx)
+ -> Hash Join (cost=xxx rows=1130 width=xxx)
Hash Cond: (bmt3.c1 = bmt4.c1)
- -> Seq Scan on t3 bmt3 (cost=xxx rows=1100 width=xxx)
- -> Hash (cost=xxx rows=1100 width=xxx)
- -> Seq Scan on t4 bmt4 (cost=xxx rows=1100 width=xxx)
+ -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
+ -> Hash (cost=xxx rows=1130 width=xxx)
+ -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
-> Hash (cost=xxx rows=100 width=xxx)
-> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
(14 rows)
QUERY PLAN
-------------------------------------------------
Index Scan using pg_class_oid_index on pg_class
- Index Cond: (oid = 1::oid)
+ Index Cond: (oid = '1'::oid)
(2 rows)
/*+SeqScan(pg_class)*/
duplication hint:
error hint:
- QUERY PLAN
---------------------------
+ QUERY PLAN
+----------------------------
Seq Scan on pg_class
- Filter: (oid = 1::oid)
+ Filter: (oid = '1'::oid)
(2 rows)
-- No. S-1-5-6
----
-- No. S-2-4-1
EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1) WHERE t1.c1 = 1;
- QUERY PLAN
----------------------------
- Values Scan on "*VALUES*"
- Filter: (column1 = 1)
-(2 rows)
+ QUERY PLAN
+------------
+ Result
+(1 row)
/*+SeqScan(t1)*/
EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1) WHERE t1.c1 = 1;
duplication hint:
error hint:
- QUERY PLAN
----------------------------
- Values Scan on "*VALUES*"
- Filter: (column1 = 1)
-(2 rows)
+ QUERY PLAN
+------------
+ Result
+(1 row)
/*+SeqScan(*VALUES*)*/
EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1) WHERE t1.c1 = 1;
duplication hint:
error hint:
- QUERY PLAN
----------------------------
- Values Scan on "*VALUES*"
- Filter: (column1 = 1)
-(2 rows)
+ QUERY PLAN
+------------
+ Result
+(1 row)
-- No. S-2-4-2
-EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t2 (c1, c2) WHERE t1.c1 = t2.c1;
- QUERY PLAN
-------------------------------------------------------------
- Nested Loop
- Join Filter: ("*VALUES*".column1 = "*VALUES*_1".column1)
+EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t2 (c1, c2) WHERE t1.c1 = t2.c1;
+ QUERY PLAN
+----------------------------------------------------------
+ Hash Join
+ Hash Cond: ("*VALUES*".column1 = "*VALUES*_1".column1)
-> Values Scan on "*VALUES*"
- -> Values Scan on "*VALUES*_1"
-(4 rows)
+ -> Hash
+ -> Values Scan on "*VALUES*_1"
+(5 rows)
/*+SeqScan(t1 t2)*/
-EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t2 (c1, c2) WHERE t1.c1 = t2.c1;
+EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t2 (c1, c2) WHERE t1.c1 = t2.c1;
INFO: pg_hint_plan: hint syntax error at or near ""
DETAIL: SeqScan hint accepts only one relation.
LOG: pg_hint_plan:
error hint:
SeqScan(t1 t2)
- QUERY PLAN
-------------------------------------------------------------
- Nested Loop
- Join Filter: ("*VALUES*".column1 = "*VALUES*_1".column1)
+ QUERY PLAN
+----------------------------------------------------------
+ Hash Join
+ Hash Cond: ("*VALUES*".column1 = "*VALUES*_1".column1)
-> Values Scan on "*VALUES*"
- -> Values Scan on "*VALUES*_1"
-(4 rows)
+ -> Hash
+ -> Values Scan on "*VALUES*_1"
+(5 rows)
/*+SeqScan(*VALUES*)*/
-EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t2 (c1, c2) WHERE t1.c1 = t2.c1;
+EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t2 (c1, c2) WHERE t1.c1 = t2.c1;
LOG: pg_hint_plan:
used hint:
not used hint:
duplication hint:
error hint:
- QUERY PLAN
-------------------------------------------------------------
- Nested Loop
- Join Filter: ("*VALUES*".column1 = "*VALUES*_1".column1)
+ QUERY PLAN
+----------------------------------------------------------
+ Hash Join
+ Hash Cond: ("*VALUES*".column1 = "*VALUES*_1".column1)
-> Values Scan on "*VALUES*"
- -> Values Scan on "*VALUES*_1"
-(4 rows)
+ -> Hash
+ -> Values Scan on "*VALUES*_1"
+(5 rows)
----
---- No. S-3-1 scan method hint
-----------------------------------------------------------------------------------------------------------------------------------------
Tid Scan on ti1
TID Cond: (ctid = '(1,1)'::tid)
- Filter: ((c1 < 100) AND (c2 = 1) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c1 < 100) AND (c2 = 1) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
(3 rows)
-- No. S-3-4-1
----------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using ti1_btree on ti1
Index Cond: (c1 < 100)
- Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
(3 rows)
-- No. S-3-4-2
----------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using ti1_hash on ti1
Index Cond: (c1 = 100)
- Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
(3 rows)
-- No. S-3-4-3
----------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using ti1_gist on ti1
Index Cond: (c1 < 100)
- Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
(3 rows)
-- No. S-3-4-4
-----------------------------------------------------------------------------------------------------------------------------------------
Tid Scan on ti1
TID Cond: (ctid = '(1,1)'::tid)
- Filter: ((c1 < 100) AND (c2 = 1) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c1 < 100) AND (c2 = 1) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
(3 rows)
-- No. S-3-4-5
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using ti1_expr on ti1
Index Cond: ((c1 < 100) = true)
- Filter: ((c1 < 100) AND (c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c1 < 100) AND (c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
(3 rows)
-- No. S-3-4-6
----------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using ti1_uniq on ti1
Index Cond: (c1 < 100)
- Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
(3 rows)
-- No. S-3-4-8
---------------------------------------------------------------------------------------------------------------------------------------
Index Scan using ti1_multi on ti1
Index Cond: ((c1 < 100) AND (c2 = 1))
- Filter: ((ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
(3 rows)
-- No. S-3-4-9
-----------------------------------------------------------------------------------------------------------------------------------------
Tid Scan on ti1
TID Cond: (ctid = '(1,1)'::tid)
- Filter: ((c1 < 100) AND (c2 = 1) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c1 < 100) AND (c2 = 1) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
(3 rows)
-- No. S-3-4-10
----------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using ti1_pkey on ti1
Index Cond: (c1 < 100)
- Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
(3 rows)
-- No. S-3-4-11
------------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using ti1_c2_key on ti1
Index Cond: (c2 = 1)
- Filter: ((c1 < 100) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c1 < 100) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
(3 rows)
-- No. S-3-4-12
----------------------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on ti1
Recheck Cond: (c1 < 100)
- Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
-> Bitmap Index Scan on ti1_btree
Index Cond: (c1 < 100)
(5 rows)
----------------------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on ti1
Recheck Cond: (c1 = 100)
- Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
-> Bitmap Index Scan on ti1_hash
Index Cond: (c1 = 100)
(5 rows)
----------------------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on ti1
Recheck Cond: (c1 < 100)
- Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
-> Bitmap Index Scan on ti1_gist
Index Cond: (c1 < 100)
(5 rows)
----------------------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on ti1
Recheck Cond: (c1 < 100)
- Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
-> Bitmap Index Scan on ti1_gin
Index Cond: (c1 < 100)
(5 rows)
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on ti1
- Filter: ((c1 < 100) AND (c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c1 < 100) AND (c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
-> Bitmap Index Scan on ti1_expr
Index Cond: ((c1 < 100) = true)
(4 rows)
----------------------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on ti1
Recheck Cond: (c1 < 100)
- Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
-> Bitmap Index Scan on ti1_uniq
Index Cond: (c1 < 100)
(5 rows)
---------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on ti1
Recheck Cond: ((c1 < 100) AND (c2 = 1))
- Filter: ((ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
-> Bitmap Index Scan on ti1_multi
Index Cond: ((c1 < 100) AND (c2 = 1))
(5 rows)
----------------------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on ti1
Recheck Cond: (c1 < 100)
- Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c2 = 1) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
-> Bitmap Index Scan on ti1_pkey
Index Cond: (c1 < 100)
(5 rows)
------------------------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on ti1
Recheck Cond: (c2 = 1)
- Filter: ((c1 < 100) AND (ctid = '(1,1)'::tid) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery) AND (lower(c4) = '1'::text))
+ Filter: ((c1 < 100) AND (ctid = '(1,1)'::tid) AND (lower(c4) = '1'::text) AND (to_tsvector('english'::regconfig, c4) @@ '''a'' & ''b'''::tsquery))
-> Bitmap Index Scan on ti1_c2_key
Index Cond: (c2 = 1)
(5 rows)
duplication hint:
error hint:
- QUERY PLAN
-----------------------------------
- Index Scan using ti1_gist on ti1
+ QUERY PLAN
+---------------------------------------
+ Index Only Scan using ti1_gist on ti1
Index Cond: (c1 < 1)
(2 rows)
QUERY PLAN
--------------------------
Update on p1
+ Update on p1
+ Update on p1c1
-> Seq Scan on p1
Filter: (c1 = 1)
-> Seq Scan on p1c1
Filter: (c1 = 1)
-(5 rows)
+(7 rows)
/*+IndexScan(p1)*/
EXPLAIN (COSTS false) UPDATE s1.p1 SET c4 = c4 WHERE c1 = 1;
QUERY PLAN
---------------------------------------
Update on p1
+ Update on p1
+ Update on p1c1
-> Index Scan using p1_i on p1
Index Cond: (c1 = 1)
-> Index Scan using p1c1_i on p1c1
Index Cond: (c1 = 1)
-(5 rows)
+(7 rows)
/*+IndexScan(p1 p1_pkey)*/
EXPLAIN (COSTS false) UPDATE s1.p1 SET c4 = c4 WHERE c1 = 1;
QUERY PLAN
------------------------------------------
Update on p1
+ Update on p1
+ Update on p1c1
-> Index Scan using p1_pkey on p1
Index Cond: (c1 = 1)
-> Index Scan using p1c1_pkey on p1c1
Index Cond: (c1 = 1)
-(5 rows)
+(7 rows)
----
---- No. S-3-9 inheritance table number