Filter: (ctid = '(1,1)'::tid)
-> Bitmap Index Scan on t4_pkey
Index Cond: (c1 = b1t2.c1)
- InitPlan 2 (returns $4)
+ InitPlan 2 (returns $5)
-> Aggregate
-> Nested Loop
Join Filter: (b2t1.c1 = b2t4.c1)
-> Index Scan using t4_pkey on t4 b2t4
Index Cond: (c1 = b2t2.c1)
Filter: (ctid = '(1,1)'::tid)
- InitPlan 3 (returns $7)
+ InitPlan 3 (returns $8)
-> Aggregate
-> Nested Loop
Join Filter: (b3t1.c1 = b3t2.c1)
-> Nested Loop
Join Filter: (bmt1.c1 = bmt4.c1)
-> Seq Scan on t1 bmt1
- Filter: ((c1 <> $7) AND (ctid = '(1,1)'::tid))
+ Filter: ((c1 <> $8) AND (ctid = '(1,1)'::tid))
-> Tid Scan on t4 bmt4
TID Cond: (ctid = '(1,1)'::tid)
-> Index Scan using t2_pkey on t2 bmt2
Filter: (ctid = '(1,1)'::tid)
-> Bitmap Index Scan on t4_pkey
Index Cond: (c1 = b1t2.c1)
- InitPlan 3 (returns $3)
+ InitPlan 3 (returns $4)
-> Result
- InitPlan 2 (returns $2)
+ InitPlan 2 (returns $3)
-> Limit
-> Bitmap Heap Scan on t1 b2t1
Recheck Cond: ((c1 IS NOT NULL) AND (c1 = 1))
Filter: (ctid = '(1,1)'::tid)
-> Bitmap Index Scan on t1_pkey
Index Cond: ((c1 IS NOT NULL) AND (c1 = 1))
- InitPlan 5 (returns $5)
+ InitPlan 5 (returns $6)
-> Result
- InitPlan 4 (returns $4)
+ InitPlan 4 (returns $5)
-> Limit
-> Index Scan Backward using t1_pkey on t1 b3t1
Index Cond: (c1 IS NOT NULL)
-> Nested Loop
Join Filter: (bmt1.c1 = bmt4.c1)
-> Seq Scan on t1 bmt1
- Filter: ((c1 <> $5) AND (ctid = '(1,1)'::tid))
+ Filter: ((c1 <> $6) AND (ctid = '(1,1)'::tid))
-> Tid Scan on t4 bmt4
TID Cond: (ctid = '(1,1)'::tid)
-> Index Scan using t2_pkey on t2 bmt2
---- No. S-3-5 not used index
----
-- No. S-3-5-1
-\! psql contrib_regression -c "/*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
+\o results/ut-S.tmpout
+/*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100;
LOG: available indexes for IndexScan(ti1): ti1_pred
LOG: pg_hint_plan:
used hint:
duplication hint:
error hint:
- QUERY PLAN
-------------------------------------------------------------------------
- Seq Scan on ti1 (cost=10000000000.00..10000000018.50 rows=1 width=15)
+\o
+\! sql/maskout.sh results/ut-S.tmpout
+ QUERY PLAN
+-------------------------------------------------------------------------------
+ Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
-(2 rows)
-- No. S-3-5-2
-\! psql contrib_regression -c "/*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
+\o results/ut-S.tmpout
+/*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100;
LOG: available indexes for BitmapScan(ti1): ti1_pred
LOG: pg_hint_plan:
used hint:
duplication hint:
error hint:
- QUERY PLAN
-------------------------------------------------------------------------
- Seq Scan on ti1 (cost=10000000000.00..10000000018.50 rows=1 width=15)
+\o
+\! sql/maskout.sh results/ut-S.tmpout
+ QUERY PLAN
+-------------------------------------------------------------------------------
+ Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
-(2 rows)
-- No. S-3-5-3
-\! psql contrib_regression -c "/*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
+\o results/ut-S.tmpout
+/*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100;
LOG: available indexes for IndexOnlyScan(ti1): ti1_pred
LOG: pg_hint_plan:
used hint:
duplication hint:
error hint:
- QUERY PLAN
------------------------------------------------------------------------
- Seq Scan on ti1 (cost=10000000000.00..10000000018.50 rows=1 width=4)
+\o
+\! sql/maskout.sh results/ut-S.tmpout
+ QUERY PLAN
+-------------------------------------------------------------------------------
+ Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
-(2 rows)
-- No. S-3-5-4
-\! psql contrib_regression -c "/*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
+\o results/ut-S.tmpout
+/*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100;
LOG: available indexes for IndexScan(ti1):
LOG: pg_hint_plan:
used hint:
duplication hint:
error hint:
- QUERY PLAN
-------------------------------------------------------------------------
- Seq Scan on ti1 (cost=10000000000.00..10000000018.50 rows=1 width=15)
+\o
+\! sql/maskout.sh results/ut-S.tmpout
+ QUERY PLAN
+-------------------------------------------------------------------------------
+ Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
-(2 rows)
-- No. S-3-5-5
-\! psql contrib_regression -c "/*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
+\o results/ut-S.tmpout
+/*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100;
LOG: available indexes for BitmapScan(ti1):
LOG: pg_hint_plan:
used hint:
duplication hint:
error hint:
- QUERY PLAN
-------------------------------------------------------------------------
- Seq Scan on ti1 (cost=10000000000.00..10000000018.50 rows=1 width=15)
+\o
+\! sql/maskout.sh results/ut-S.tmpout
+ QUERY PLAN
+-------------------------------------------------------------------------------
+ Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
-(2 rows)
-- No. S-3-5-6
-\! psql contrib_regression -c "/*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
+\o results/ut-S.tmpout
+/*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100;
LOG: available indexes for IndexOnlyScan(ti1):
LOG: pg_hint_plan:
used hint:
duplication hint:
error hint:
- QUERY PLAN
------------------------------------------------------------------------
- Seq Scan on ti1 (cost=10000000000.00..10000000018.50 rows=1 width=4)
+\o
+\! sql/maskout.sh results/ut-S.tmpout
+ QUERY PLAN
+-------------------------------------------------------------------------------
+ Seq Scan on ti1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 100)
-(2 rows)
-- No. S-3-5-7
EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
Index Cond: (c1 = 1)
(2 rows)
-\! psql contrib_regression -c "/*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1" | grep -v "Planning time:"
+\o results/ut-S.tmpout
+/*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
LOG: pg_hint_plan:
used hint:
TidScan(t1)
duplication hint:
error hint:
- QUERY PLAN
------------------------------------------------------------------------
- Seq Scan on t1 (cost=10000000000.00..10000000018.50 rows=1 width=15)
+\o
+\! sql/maskout.sh results/ut-S.tmpout
+ QUERY PLAN
+-------------------------------------------------------------------------------
+ Seq Scan on t1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 1)
-(2 rows)
----
---- No. S-3-6 query structure
----
EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1 AND t1.ctid = '(1,1)';
- QUERY PLAN
------------------------------------------
- Nested Loop
- Join Filter: (t1.c1 = t2.c1)
- -> Tid Scan on t1
- TID Cond: (ctid = '(1,1)'::tid)
+ QUERY PLAN
+-----------------------------------------------
+ Hash Join
+ Hash Cond: (t2.c1 = t1.c1)
-> Seq Scan on t2
-(5 rows)
+ -> Hash
+ -> Tid Scan on t1
+ TID Cond: (ctid = '(1,1)'::tid)
+(6 rows)
-- No. S-3-6-1
/*+SeqScan(t1)*/
\! sql/maskout.sh results/ut-S.tmpout
QUERY PLAN
----------------------------------------------------------
- Append (cost=xxx rows=4 width=xxx)
- -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
+ Append (cost=xxx..xxx rows=4 width=xxx)
+ -> Seq Scan on p1 (cost=xxx..xxx rows=1 width=xxx)
Filter: ((c1 < 10) AND ((c2 * 2) < 100))
- -> Seq Scan on p1c1 (cost=xxx rows=3 width=xxx)
+ -> Seq Scan on p1c1 (cost=xxx..xxx rows=3 width=xxx)
Filter: ((c1 < 10) AND ((c2 * 2) < 100))
-(5 rows)
\o results/ut-S.tmpout
/*+IndexScan(p1 p1_parent)*/ EXPLAIN SELECT c4 FROM s1.p1 WHERE c2 * 2 < 100 AND c1 < 10;
\! sql/maskout.sh results/ut-S.tmpout
QUERY PLAN
------------------------------------------------------------------------------------
- Append (cost=xxx rows=4 width=xxx)
- -> Index Scan using p1_parent on p1 (cost=xxx rows=1 width=xxx)
+ Append (cost=xxx..xxx rows=4 width=xxx)
+ -> Index Scan using p1_parent on p1 (cost=xxx..xxx rows=1 width=xxx)
Filter: ((c2 * 2) < 100)
- -> Index Scan using p1c1_c4_expr_idx on p1c1 (cost=xxx rows=3 width=xxx)
+ -> Index Scan using p1c1_c4_expr_idx on p1c1 (cost=xxx..xxx rows=3 width=xxx)
Filter: ((c2 * 2) < 100)
-(5 rows)
-- No. S-3-10-4
\o results/ut-S.tmpout
\o
\! sql/maskout.sh results/ut-S.tmpout
- QUERY PLAN
-------------------------------------------------------------------------------
- Append (cost=xxx rows=4 width=xxx)
- -> Index Scan using p1_i2 on p1 (cost=xxx rows=1 width=xxx)
+ QUERY PLAN
+-------------------------------------------------------------------------------
+ Append (cost=xxx..xxx rows=4 width=xxx)
+ -> Index Scan using p1_i2 on p1 (cost=xxx..xxx rows=1 width=xxx)
Index Cond: (c2 = 1)
- -> Seq Scan on p1c1 (cost=xxx rows=1 width=xxx)
+ -> Seq Scan on p1c1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c2 = 1)
- -> Seq Scan on p1c2 (cost=xxx rows=1 width=xxx)
+ -> Seq Scan on p1c2 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c2 = 1)
- -> Seq Scan on p1c3 (cost=xxx rows=1 width=xxx)
+ -> Seq Scan on p1c3 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c2 = 1)
-(9 rows)
-- No. S-3-10-5
\o results/ut-S.tmpout
\! sql/maskout.sh results/ut-S.tmpout
QUERY PLAN
---------------------------------------------------------------------------------
- Append (cost=xxx rows=3 width=xxx)
- -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
+ Append (cost={inf}..{inf} rows=3 width=xxx)
+ -> Seq Scan on p2 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 1)
- -> Index Scan using p2c1_pkey on p2c1 (cost=xxx rows=1 width=xxx)
+ -> Index Scan using p2c1_pkey on p2c1 (cost=xxx..xxx rows=1 width=xxx)
Index Cond: (c1 = 1)
- -> Seq Scan on p2c1c1 (cost=xxx rows=1 width=xxx)
+ -> Seq Scan on p2c1c1 (cost={inf}..{inf} rows=1 width=xxx)
Filter: (c1 = 1)
-(7 rows)
----
---- No. S-3-12 specified same table