OSDN Git Service

Change copyright year to 2019
[pghintplan/pg_hint_plan.git] / expected / ut-J.out
index 9141990..704bcc7 100644 (file)
@@ -3,6 +3,7 @@ SET pg_hint_plan.enable_hint TO on;
 SET pg_hint_plan.debug_print TO on;
 SET client_min_messages TO LOG;
 SET search_path TO public;
+SET max_parallel_workers_per_gather TO 0;
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
              QUERY PLAN             
 ------------------------------------
@@ -195,7 +196,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
 
 /*+HashJoin(t1 t1)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
-INFO:  hint syntax error at or near "HashJoin(t1 t1)"
+INFO:  pg_hint_plan: hint syntax error at or near "HashJoin(t1 t1)"
 DETAIL:  Relation name "t1" is ambiguous.
 LOG:  pg_hint_plan:
 used hint:
@@ -357,7 +358,7 @@ error hint:
 -- No. J-1-5-2
 /*+HashJoin(t1 t1)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
-INFO:  hint syntax error at or near "HashJoin(t1 t1)"
+INFO:  pg_hint_plan: hint syntax error at or near "HashJoin(t1 t1)"
 DETAIL:  Relation name "t1" is duplicated.
 LOG:  pg_hint_plan:
 used hint:
@@ -379,9 +380,9 @@ HashJoin(t1 t1)
 -- No. J-1-5-3
 /*+HashJoin(t1 t1)HashJoin(t2 t2)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
-INFO:  hint syntax error at or near "HashJoin(t1 t1)HashJoin(t2 t2)"
+INFO:  pg_hint_plan: hint syntax error at or near "HashJoin(t1 t1)HashJoin(t2 t2)"
 DETAIL:  Relation name "t1" is duplicated.
-INFO:  hint syntax error at or near "HashJoin(t2 t2)"
+INFO:  pg_hint_plan: hint syntax error at or near "HashJoin(t2 t2)"
 DETAIL:  Relation name "t2" is duplicated.
 LOG:  pg_hint_plan:
 used hint:
@@ -417,7 +418,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3 WHERE t1.c1 = t2.c1 AND
 
 /*+HashJoin(t1 t2 t1 t2)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
-INFO:  hint syntax error at or near "HashJoin(t1 t2 t1 t2)"
+INFO:  pg_hint_plan: hint syntax error at or near "HashJoin(t1 t2 t1 t2)"
 DETAIL:  Relation name "t1" is duplicated.
 LOG:  pg_hint_plan:
 used hint:
@@ -808,7 +809,7 @@ error hint:
          Index Cond: (c1 = $1)
    ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
          Filter: (c1 = $1)
-(12 rows)
+(11 rows)
 
 --
 -- There are cases where difference in the measured value and predicted value
@@ -2691,7 +2692,7 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1 WHERE b3t1.ctid = '(1,1)'
                    ->  Tid Scan on t1 b2t1
                          TID Cond: (ctid = '(1,1)'::tid)
                          Filter: ((c1 IS NOT NULL) AND (c1 = 1))
-   InitPlan 4 (returns $3)
+   InitPlan 4 (returns $4)
      ->  Aggregate
            ->  Tid Scan on t1 b3t1
                  TID Cond: (ctid = '(1,1)'::tid)
@@ -2705,7 +2706,7 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1 WHERE b3t1.ctid = '(1,1)'
                            Join Filter: (bmt1.c1 = bmt2.c1)
                            ->  Tid Scan on t1 bmt1
                                  TID Cond: (ctid = '(1,1)'::tid)
-                                 Filter: (c1 <> $3)
+                                 Filter: (c1 <> $4)
                            ->  Seq Scan on t2 bmt2
                                  Filter: (ctid = '(1,1)'::tid)
                      ->  Tid Scan on t3 bmt3
@@ -2784,7 +2785,7 @@ error hint:
                    ->  Tid Scan on t1 b2t1
                          TID Cond: (ctid = '(1,1)'::tid)
                          Filter: ((c1 IS NOT NULL) AND (c1 = 1))
-   InitPlan 4 (returns $3)
+   InitPlan 4 (returns $4)
      ->  Aggregate
            ->  Tid Scan on t1 b3t1
                  TID Cond: (ctid = '(1,1)'::tid)
@@ -2814,7 +2815,7 @@ error hint:
                Sort Key: bmt1.c1
                ->  Tid Scan on t1 bmt1
                      TID Cond: (ctid = '(1,1)'::tid)
-                     Filter: (c1 <> $3)
+                     Filter: (c1 <> $4)
 (60 rows)
 
 ----
@@ -3653,7 +3654,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
 
 /*+HashJoin(v1t1 v1t1)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
-INFO:  hint syntax error at or near "HashJoin(v1t1 v1t1)"
+INFO:  pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)"
 DETAIL:  Relation name "v1t1" is ambiguous.
 LOG:  pg_hint_plan:
 used hint:
@@ -3712,7 +3713,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
 
 /*+HashJoin(r4t1 r4t1)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
-INFO:  hint syntax error at or near "HashJoin(r4t1 r4t1)"
+INFO:  pg_hint_plan: hint syntax error at or near "HashJoin(r4t1 r4t1)"
 DETAIL:  Relation name "r4t1" is ambiguous.
 LOG:  pg_hint_plan:
 used hint:
@@ -3763,17 +3764,14 @@ error hint:
 ----
 -- No. J-2-4-1
 EXPLAIN (COSTS false) 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;
-                   QUERY PLAN                    
--------------------------------------------------
+             QUERY PLAN             
+------------------------------------
  Nested Loop
-   ->  Hash Join
-         Hash Cond: (t2.c1 = "*VALUES*".column1)
-         ->  Seq Scan on t2
-         ->  Hash
-               ->  Values Scan on "*VALUES*"
    ->  Index Scan using t1_i1 on t1
-         Index Cond: (c1 = t2.c1)
-(8 rows)
+         Index Cond: (c1 = 1)
+   ->  Seq Scan on t2
+         Filter: (c1 = 1)
+(5 rows)
 
 /*+ Leading(t3 t1 t2) HashJoin(t3 t1)NestLoop(t3 t1 t2)*/
 EXPLAIN (COSTS false) 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;
@@ -3786,20 +3784,17 @@ Leading(t3 t1 t2)
 duplication hint:
 error hint:
 
-                   QUERY PLAN                    
--------------------------------------------------
+             QUERY PLAN             
+------------------------------------
  Nested Loop
-   ->  Hash Join
-         Hash Cond: (t2.c1 = "*VALUES*".column1)
-         ->  Seq Scan on t2
-         ->  Hash
-               ->  Values Scan on "*VALUES*"
    ->  Index Scan using t1_i1 on t1
-         Index Cond: (c1 = t2.c1)
-(8 rows)
+         Index Cond: (c1 = 1)
+   ->  Seq Scan on t2
+         Filter: (c1 = 1)
+(5 rows)
 
 /*+ Leading(*VALUES* t1 t2) HashJoin(*VALUES* t1)NestLoop(*VALUES* t1 t2)*/
-EXPLAIN (COSTS false) 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 (COSTS false) 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:
 HashJoin(*VALUES* t1)
@@ -3822,24 +3817,25 @@ error hint:
 (8 rows)
 
 -- No. J-2-4-2
-EXPLAIN (COSTS false) 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 (COSTS false) 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;
                       QUERY PLAN                       
 -------------------------------------------------------
  Nested Loop
-   Join Filter: (t1.c1 = "*VALUES*_1".column1)
    ->  Nested Loop
+         Join Filter: (t2.c1 = "*VALUES*_1".column1)
          ->  Hash Join
                Hash Cond: (t2.c1 = "*VALUES*".column1)
                ->  Seq Scan on t2
                ->  Hash
                      ->  Values Scan on "*VALUES*"
-         ->  Index Scan using t1_i1 on t1
-               Index Cond: (c1 = t2.c1)
-   ->  Values Scan on "*VALUES*_1"
-(11 rows)
+         ->  Materialize
+               ->  Values Scan on "*VALUES*_1"
+   ->  Index Scan using t1_i1 on t1
+         Index Cond: (c1 = t2.c1)
+(12 rows)
 
 /*+ Leading(t4 t3 t2 t1) NestLoop(t4 t3)HashJoin(t4 t3 t2)MergeJoin(t4 t3 t2 t1)*/
-EXPLAIN (COSTS false) 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 (COSTS false) 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:
@@ -3853,25 +3849,26 @@ error hint:
                       QUERY PLAN                       
 -------------------------------------------------------
  Nested Loop
-   Join Filter: (t1.c1 = "*VALUES*_1".column1)
    ->  Nested Loop
+         Join Filter: (t2.c1 = "*VALUES*_1".column1)
          ->  Hash Join
                Hash Cond: (t2.c1 = "*VALUES*".column1)
                ->  Seq Scan on t2
                ->  Hash
                      ->  Values Scan on "*VALUES*"
-         ->  Index Scan using t1_i1 on t1
-               Index Cond: (c1 = t2.c1)
-   ->  Values Scan on "*VALUES*_1"
-(11 rows)
+         ->  Materialize
+               ->  Values Scan on "*VALUES*_1"
+   ->  Index Scan using t1_i1 on t1
+         Index Cond: (c1 = t2.c1)
+(12 rows)
 
 /*+ Leading(*VALUES* t3 t2 t1) NestLoop(t4 t3)HashJoin(*VALUES* t3 t2)MergeJoin(*VALUES* t3 t2 t1)*/
-EXPLAIN (COSTS false) 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;
-INFO:  hint syntax error at or near "HashJoin(*VALUES* t3 t2)MergeJoin(*VALUES* t3 t2 t1)"
+EXPLAIN (COSTS false) 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 "HashJoin(*VALUES* t3 t2)MergeJoin(*VALUES* t3 t2 t1)"
 DETAIL:  Relation name "*VALUES*" is ambiguous.
-INFO:  hint syntax error at or near "MergeJoin(*VALUES* t3 t2 t1)"
+INFO:  pg_hint_plan: hint syntax error at or near "MergeJoin(*VALUES* t3 t2 t1)"
 DETAIL:  Relation name "*VALUES*" is ambiguous.
-INFO:  hint syntax error at or near "Leading(*VALUES* t3 t2 t1) NestLoop(t4 t3)HashJoin(*VALUES* t3 t2)MergeJoin(*VALUES* t3 t2 t1)"
+INFO:  pg_hint_plan: hint syntax error at or near "Leading(*VALUES* t3 t2 t1) NestLoop(t4 t3)HashJoin(*VALUES* t3 t2)MergeJoin(*VALUES* t3 t2 t1)"
 DETAIL:  Relation name "*VALUES*" is ambiguous.
 LOG:  pg_hint_plan:
 used hint:
@@ -3886,17 +3883,18 @@ Leading(*VALUES* t3 t2 t1)
                       QUERY PLAN                       
 -------------------------------------------------------
  Nested Loop
-   Join Filter: (t1.c1 = "*VALUES*_1".column1)
    ->  Nested Loop
+         Join Filter: (t2.c1 = "*VALUES*_1".column1)
          ->  Hash Join
                Hash Cond: (t2.c1 = "*VALUES*".column1)
                ->  Seq Scan on t2
                ->  Hash
                      ->  Values Scan on "*VALUES*"
-         ->  Index Scan using t1_i1 on t1
-               Index Cond: (c1 = t2.c1)
-   ->  Values Scan on "*VALUES*_1"
-(11 rows)
+         ->  Materialize
+               ->  Values Scan on "*VALUES*_1"
+   ->  Index Scan using t1_i1 on t1
+         Index Cond: (c1 = t2.c1)
+(12 rows)
 
 ----
 ---- No. J-3-1 join method hint
@@ -4397,7 +4395,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
 -- No. J-3-3-1
 /*+HashJoin(t1 t2)NestLoop(t1 t2)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
-INFO:  hint syntax error at or near "HashJoin(t1 t2)NestLoop(t1 t2)"
+INFO:  pg_hint_plan: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t1 t2)"
 DETAIL:  Conflict join method hint.
 LOG:  pg_hint_plan:
 used hint:
@@ -4418,9 +4416,9 @@ error hint:
 -- No. J-3-3-2
 /*+MergeJoin(t1 t2)HashJoin(t1 t2)NestLoop(t1 t2)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
-INFO:  hint syntax error at or near "MergeJoin(t1 t2)HashJoin(t1 t2)NestLoop(t1 t2)"
+INFO:  pg_hint_plan: hint syntax error at or near "MergeJoin(t1 t2)HashJoin(t1 t2)NestLoop(t1 t2)"
 DETAIL:  Conflict join method hint.
-INFO:  hint syntax error at or near "HashJoin(t1 t2)NestLoop(t1 t2)"
+INFO:  pg_hint_plan: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t1 t2)"
 DETAIL:  Conflict join method hint.
 LOG:  pg_hint_plan:
 used hint:
@@ -4442,7 +4440,7 @@ error hint:
 -- No. J-3-3-3
 /*+HashJoin(t1 t2)NestLoop(t2 t1)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
-INFO:  hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)"
+INFO:  pg_hint_plan: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)"
 DETAIL:  Conflict join method hint.
 LOG:  pg_hint_plan:
 used hint:
@@ -4463,9 +4461,9 @@ error hint:
 -- No. J-3-3-4
 /*+MergeJoin(t2 t1)HashJoin(t1 t2)NestLoop(t2 t1)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
-INFO:  hint syntax error at or near "MergeJoin(t2 t1)HashJoin(t1 t2)NestLoop(t2 t1)"
+INFO:  pg_hint_plan: hint syntax error at or near "MergeJoin(t2 t1)HashJoin(t1 t2)NestLoop(t2 t1)"
 DETAIL:  Conflict join method hint.
-INFO:  hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)"
+INFO:  pg_hint_plan: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)"
 DETAIL:  Conflict join method hint.
 LOG:  pg_hint_plan:
 used hint:
@@ -4574,7 +4572,7 @@ error hint:
 -- No. J-3-4-7
 /*+NestLoop()*/
 SELECT * FROM s1.t1 WHERE false;
-INFO:  hint syntax error at or near ""
+INFO:  pg_hint_plan: hint syntax error at or near ""
 DETAIL:  NestLoop hint requires at least two relations.
 LOG:  pg_hint_plan:
 used hint:
@@ -4590,7 +4588,7 @@ NestLoop()
 -- No. J-3-4-8
 /*+NestLoop(t1)*/
 SELECT * FROM s1.t1 WHERE false;
-INFO:  hint syntax error at or near ""
+INFO:  pg_hint_plan: hint syntax error at or near ""
 DETAIL:  NestLoop hint requires at least two relations.
 LOG:  pg_hint_plan:
 used hint:
@@ -4664,6 +4662,6 @@ error hint:
    ->  Seq Scan on t1  (cost=xxx rows=1000 width=xxx)
    ->  Hash  (cost=xxx rows=100 width=xxx)
          ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(6 rows)
+(5 rows)
 
 \! rm results/ut-J.tmpout