• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revisionae410a85ed681c3e80933e9a07897d59a6188d1f (tree)
Time2013-08-06 14:03:35
AuthorTakashi Suzuki <suzuki.takashi@metr...>
CommiterTakashi Suzuki

Log Message

Leadingヒント句の仕様変更にそって[結合順序]試験のPG9.1用予測結果を変更した。

Change Summary

Incremental Difference

--- a/expected/ut-L-9.1.out
+++ b/expected/ut-L-9.1.out
@@ -198,27 +198,26 @@ error hint:
198198 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;
199199 LOG: pg_hint_plan:
200200 used hint:
201-Leading(t5 t2 t3 t1)
202201 not used hint:
202+Leading(t5 t2 t3 t1)
203203 duplication hint:
204204 error hint:
205205
206206 QUERY PLAN
207207 ------------------------------------------------
208- Nested Loop
208+ Merge Join
209+ Merge Cond: (t1.c1 = t2.c1)
209210 -> Merge Join
210- Merge Cond: (t1.c1 = t2.c1)
211- -> Index Scan using t1_i1 on t1
212- -> Sort
213- Sort Key: t2.c1
214- -> Hash Join
215- Hash Cond: (t3.c1 = t2.c1)
216- -> Seq Scan on t3
217- -> Hash
218- -> Seq Scan on t2
219- -> Index Scan using t4_i1 on t4
220- Index Cond: (c1 = t1.c1)
221-(13 rows)
211+ Merge Cond: (t1.c1 = t4.c1)
212+ -> Merge Join
213+ Merge Cond: (t1.c1 = t3.c1)
214+ -> Index Scan using t1_i1 on t1
215+ -> Index Scan using t3_i1 on t3
216+ -> Index Scan using t4_i1 on t4
217+ -> Sort
218+ Sort Key: t2.c1
219+ -> Seq Scan on t2
220+(12 rows)
222221
223222 ----
224223 ---- No. L-1-4 conflict table name
@@ -276,9 +275,9 @@ DETAIL: Relation name "t1" is ambiguous.
276275 LOG: pg_hint_plan:
277276 used hint:
278277 not used hint:
279-Leading(t1 t2 t3 t1)
280278 duplication hint:
281279 error hint:
280+Leading(t1 t2 t3 t1)
282281
283282 QUERY PLAN
284283 ------------------------------------------------
@@ -300,25 +299,25 @@ error hint:
300299 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s2.t1 WHERE s1.t1.c1 = t2.c1 AND s1.t1.c1 = t3.c1 AND s1.t1.c1 = s2.t1.c1;
301300 LOG: pg_hint_plan:
302301 used hint:
303-Leading(s1.t1 t2 t3 s2.t1)
304302 not used hint:
303+Leading(s1.t1 t2 t3 s2.t1)
305304 duplication hint:
306305 error hint:
307306
308307 QUERY PLAN
309308 ------------------------------------------------
310- Nested Loop
311- -> Nested Loop
309+ Merge Join
310+ Merge Cond: (s1.t1.c1 = s2.t1.c1)
311+ -> Merge Join
312+ Merge Cond: (s1.t1.c1 = t2.c1)
312313 -> Merge Join
313- Merge Cond: (t3.c1 = t2.c1)
314+ Merge Cond: (s1.t1.c1 = t3.c1)
315+ -> Index Scan using t1_i1 on t1
314316 -> Index Scan using t3_i1 on t3
315- -> Sort
316- Sort Key: t2.c1
317- -> Seq Scan on t2
318- -> Index Scan using t1_pkey on t1
319- Index Cond: (c1 = t2.c1)
320- -> Index Scan using t1_i1 on t1
321- Index Cond: (c1 = t2.c1)
317+ -> Index Scan using t2_i1 on t2
318+ -> Sort
319+ Sort Key: s2.t1.c1
320+ -> Seq Scan on t1
322321 (12 rows)
323322
324323 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s2.t1 s2t1 WHERE s1.t1.c1 = t2.c1 AND s1.t1.c1 = t3.c1 AND s1.t1.c1 = s2t1.c1;
@@ -438,11 +437,12 @@ error hint:
438437 -> Seq Scan on t2
439438 (30 rows)
440439
441-/*+Leading(st1 st2 st3 st4 t4 t2 t3 t1)*/
440+/*+Leading(st1 st2 st3 st4)Leading(t4 t2 t3 t1)*/
442441 EXPLAIN (COSTS false) SELECT *, (SELECT max(st1.c1) FROM s1.t1 st1, s1.t2 st2, s1.t3 st3, s1.t4 st4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1) FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
443442 LOG: pg_hint_plan:
444443 used hint:
445-Leading(st1 st2 st3 st4 t4 t2 t3 t1)
444+Leading(st1 st2 st3 st4)
445+Leading(t4 t2 t3 t1)
446446 not used hint:
447447 duplication hint:
448448 error hint:
@@ -513,30 +513,30 @@ error hint:
513513 -- No. L-1-5-2
514514 /*+Leading(t4 t2 t3 t1 t4)*/
515515 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;
516+INFO: hint syntax error at or near "Leading(t4 t2 t3 t1 t4)"
517+DETAIL: Relation name "t4" is duplicated.
516518 LOG: pg_hint_plan:
517519 used hint:
518-Leading(t4 t2 t3 t1 t4)
519520 not used hint:
520521 duplication hint:
521522 error hint:
523+Leading(t4 t2 t3 t1 t4)
522524
523- QUERY PLAN
524-------------------------------------------------------
525+ QUERY PLAN
526+------------------------------------------------
525527 Merge Join
526528 Merge Cond: (t1.c1 = t2.c1)
527- -> Index Scan using t1_i1 on t1
529+ -> Merge Join
530+ Merge Cond: (t1.c1 = t4.c1)
531+ -> Merge Join
532+ Merge Cond: (t1.c1 = t3.c1)
533+ -> Index Scan using t1_i1 on t1
534+ -> Index Scan using t3_i1 on t3
535+ -> Index Scan using t4_i1 on t4
528536 -> Sort
529537 Sort Key: t2.c1
530- -> Hash Join
531- Hash Cond: (t3.c1 = t2.c1)
532- -> Seq Scan on t3
533- -> Hash
534- -> Hash Join
535- Hash Cond: (t4.c1 = t2.c1)
536- -> Seq Scan on t4
537- -> Hash
538- -> Seq Scan on t2
539-(14 rows)
538+ -> Seq Scan on t2
539+(12 rows)
540540
541541 /*+Leading(t4 t2 t3 t4)*/
542542 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;
@@ -568,30 +568,30 @@ Leading(t4 t2 t3 t4)
568568 -- No. L-1-5-3
569569 /*+Leading(t4 t2 t3 t1 t4 t2 t3 t1)*/
570570 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;
571+INFO: hint syntax error at or near "Leading(t4 t2 t3 t1 t4 t2 t3 t1)"
572+DETAIL: Relation name "t4" is duplicated.
571573 LOG: pg_hint_plan:
572574 used hint:
573-Leading(t4 t2 t3 t1 t4 t2 t3 t1)
574575 not used hint:
575576 duplication hint:
576577 error hint:
578+Leading(t4 t2 t3 t1 t4 t2 t3 t1)
577579
578- QUERY PLAN
579-------------------------------------------------------
580+ QUERY PLAN
581+------------------------------------------------
580582 Merge Join
581583 Merge Cond: (t1.c1 = t2.c1)
582- -> Index Scan using t1_i1 on t1
584+ -> Merge Join
585+ Merge Cond: (t1.c1 = t4.c1)
586+ -> Merge Join
587+ Merge Cond: (t1.c1 = t3.c1)
588+ -> Index Scan using t1_i1 on t1
589+ -> Index Scan using t3_i1 on t3
590+ -> Index Scan using t4_i1 on t4
583591 -> Sort
584592 Sort Key: t2.c1
585- -> Hash Join
586- Hash Cond: (t3.c1 = t2.c1)
587- -> Seq Scan on t3
588- -> Hash
589- -> Hash Join
590- Hash Cond: (t4.c1 = t2.c1)
591- -> Seq Scan on t4
592- -> Hash
593- -> Seq Scan on t2
594-(14 rows)
593+ -> Seq Scan on t2
594+(12 rows)
595595
596596 /*+Leading(t4 t2 t2 t4)*/
597597 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;
@@ -927,26 +927,25 @@ EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1, c2, c3, c4),
927927 EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1')) AS t1 (c1, c2, c3, c4), s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
928928 LOG: pg_hint_plan:
929929 used hint:
930-Leading(t4 t3 t2 t1)
931930 not used hint:
931+Leading(t4 t3 t2 t1)
932932 duplication hint:
933933 error hint:
934934
935- QUERY PLAN
936----------------------------------------------
935+ QUERY PLAN
936+-------------------------------------------------------
937937 Nested Loop
938- Join Filter: (t2.c1 = "*VALUES*".column1)
939- -> Values Scan on "*VALUES*"
940- -> Hash Join
941- Hash Cond: (t3.c1 = t2.c1)
938+ -> Nested Loop
942939 -> Hash Join
943- Hash Cond: (t3.c1 = t4.c1)
944- -> Seq Scan on t3
945- -> Hash
946- -> Seq Scan on t4
947- -> Hash
940+ Hash Cond: (t2.c1 = "*VALUES*".column1)
948941 -> Seq Scan on t2
949-(12 rows)
942+ -> Hash
943+ -> Values Scan on "*VALUES*"
944+ -> Index Scan using t3_i1 on t3
945+ Index Cond: (c1 = "*VALUES*".column1)
946+ -> Index Scan using t4_i1 on t4
947+ Index Cond: (c1 = "*VALUES*".column1)
948+(11 rows)
950949
951950 -- No. L-1-6-9
952951 EXPLAIN (COSTS false) WITH c1(c1) AS (SELECT st1.c1 FROM s1.t1 st1, s1.t1 st2, s1.t1 st3, s1.t1 st4 WHERE st1.c1 = st2.c1 AND st1.c1 = st3.c1 AND st1.c1 = st4.c1) SELECT * FROM c1 ct1, c1 ct2, c1 ct3, c1 ct4 WHERE ct1.c1 = ct2.c1 AND ct1.c1 = ct3.c1 AND ct1.c1 = ct4.c1;
@@ -987,11 +986,12 @@ EXPLAIN (COSTS false) WITH c1(c1) AS (SELECT st1.c1 FROM s1.t1 st1, s1.t1 st2, s
987986 -> CTE Scan on c1 ct4
988987 (33 rows)
989988
990-/*+Leading(ct4 ct3 ct2 ct1 st4 st3 st2 st1)*/
989+/*+Leading(ct4 ct3 ct2 ct1)Leading(st4 st3 st2 st1)*/
991990 EXPLAIN (COSTS false) WITH c1(c1) AS (SELECT st1.c1 FROM s1.t1 st1, s1.t1 st2, s1.t1 st3, s1.t1 st4 WHERE st1.c1 = st2.c1 AND st1.c1 = st3.c1 AND st1.c1 = st4.c1) SELECT * FROM c1 ct1, c1 ct2, c1 ct3, c1 ct4 WHERE ct1.c1 = ct2.c1 AND ct1.c1 = ct3.c1 AND ct1.c1 = ct4.c1;
992991 LOG: pg_hint_plan:
993992 used hint:
994-Leading(ct4 ct3 ct2 ct1 st4 st3 st2 st1)
993+Leading(ct4 ct3 ct2 ct1)
994+Leading(st4 st3 st2 st1)
995995 not used hint:
996996 duplication hint:
997997 error hint:
@@ -1145,27 +1145,26 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, (SELECT t4.c1 FROM s1.t
11451145 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, (SELECT t4.c1 FROM s1.t4) st4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = st4.c1;
11461146 LOG: pg_hint_plan:
11471147 used hint:
1148-Leading(st4 t2 t3 t1)
11491148 not used hint:
1149+Leading(st4 t2 t3 t1)
11501150 duplication hint:
11511151 error hint:
11521152
11531153 QUERY PLAN
11541154 ------------------------------------------------
1155- Nested Loop
1155+ Merge Join
1156+ Merge Cond: (t1.c1 = t2.c1)
11561157 -> Merge Join
1157- Merge Cond: (t1.c1 = t2.c1)
1158- -> Index Scan using t1_i1 on t1
1159- -> Sort
1160- Sort Key: t2.c1
1161- -> Hash Join
1162- Hash Cond: (t3.c1 = t2.c1)
1163- -> Seq Scan on t3
1164- -> Hash
1165- -> Seq Scan on t2
1166- -> Index Scan using t4_i1 on t4
1167- Index Cond: (c1 = t1.c1)
1168-(13 rows)
1158+ Merge Cond: (t1.c1 = t4.c1)
1159+ -> Merge Join
1160+ Merge Cond: (t1.c1 = t3.c1)
1161+ -> Index Scan using t1_i1 on t1
1162+ -> Index Scan using t3_i1 on t3
1163+ -> Index Scan using t4_i1 on t4
1164+ -> Sort
1165+ Sort Key: t2.c1
1166+ -> Seq Scan on t2
1167+(12 rows)
11691168
11701169 /*+Leading(t4 t2 t3 t1)*/
11711170 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, (SELECT t4.c1 FROM s1.t4) st4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = st4.c1;
@@ -1258,7 +1257,9 @@ SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2
12581257 (47 rows)
12591258
12601259 /*+
1261-Leading(bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2)
1260+Leading(bmt1 bmt2 bmt3 bmt4)
1261+Leading(b1t2 b1t3 b1t4 b1t1)
1262+Leading(b2t3 b2t4 b2t1 b2t2)
12621263 */
12631264 EXPLAIN (COSTS false)
12641265 SELECT max(bmt1.c1), (
@@ -1270,7 +1271,9 @@ SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2
12701271 ;
12711272 LOG: pg_hint_plan:
12721273 used hint:
1273-Leading(bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2)
1274+Leading(bmt1 bmt2 bmt3 bmt4)
1275+Leading(b1t2 b1t3 b1t4 b1t1)
1276+Leading(b2t3 b2t4 b2t1 b2t2)
12741277 not used hint:
12751278 duplication hint:
12761279 error hint:
@@ -1405,7 +1408,10 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3
14051408 (63 rows)
14061409
14071410 /*+
1408-Leading(bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2 b3t4 b3t1 b3t2 b3t3)
1411+Leading(bmt1 bmt2 bmt3 bmt4)
1412+Leading(b1t2 b1t3 b1t4 b1t1)
1413+Leading(b2t3 b2t4 b2t1 b2t2)
1414+Leading(b3t4 b3t1 b3t2 b3t3)
14091415 */
14101416 EXPLAIN (COSTS false)
14111417 SELECT max(bmt1.c1), (
@@ -1419,7 +1425,10 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3
14191425 ;
14201426 LOG: pg_hint_plan:
14211427 used hint:
1422-Leading(bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2 b3t4 b3t1 b3t2 b3t3)
1428+Leading(bmt1 bmt2 bmt3 bmt4)
1429+Leading(b1t2 b1t3 b1t4 b1t1)
1430+Leading(b2t3 b2t4 b2t1 b2t2)
1431+Leading(b3t4 b3t1 b3t2 b3t3)
14231432 not used hint:
14241433 duplication hint:
14251434 error hint:
@@ -1655,7 +1664,9 @@ SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2
16551664 (48 rows)
16561665
16571666 /*+
1658-Leading(bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2)
1667+Leading(bmt1 bmt2 bmt3 bmt4)
1668+Leading(b1t2 b1t3 b1t4 b1t1)
1669+Leading(b2t3 b2t4 b2t1 b2t2)
16591670 */
16601671 EXPLAIN (COSTS false)
16611672 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.ctid = '(1,1)' AND bmt1.c1 = bmt2.c1 AND bmt2.ctid = '(1,1)' AND bmt1.c1 = bmt3.c1 AND bmt3.ctid = '(1,1)' AND bmt1.c1 = bmt4.c1 AND bmt4.ctid = '(1,1)'
@@ -1667,7 +1678,9 @@ SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2
16671678 ;
16681679 LOG: pg_hint_plan:
16691680 used hint:
1670-Leading(bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2)
1681+Leading(bmt1 bmt2 bmt3 bmt4)
1682+Leading(b1t2 b1t3 b1t4 b1t1)
1683+Leading(b2t3 b2t4 b2t1 b2t2)
16711684 not used hint:
16721685 duplication hint:
16731686 error hint:
@@ -1804,7 +1817,10 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3
18041817 (64 rows)
18051818
18061819 /*+
1807-Leading(bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2 b3t4 b3t1 b3t2 b3t3)
1820+Leading(bmt1 bmt2 bmt3 bmt4)
1821+Leading(b1t2 b1t3 b1t4 b1t1)
1822+Leading(b2t3 b2t4 b2t1 b2t2)
1823+Leading(b3t4 b3t1 b3t2 b3t3)
18081824 */
18091825 EXPLAIN (COSTS false)
18101826 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.ctid = '(1,1)' AND bmt1.c1 = bmt2.c1 AND bmt2.ctid = '(1,1)' AND bmt1.c1 = bmt3.c1 AND bmt3.ctid = '(1,1)' AND bmt1.c1 = bmt4.c1 AND bmt4.ctid = '(1,1)'
@@ -1818,7 +1834,10 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3
18181834 ;
18191835 LOG: pg_hint_plan:
18201836 used hint:
1821-Leading(bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2 b3t4 b3t1 b3t2 b3t3)
1837+Leading(bmt1 bmt2 bmt3 bmt4)
1838+Leading(b1t2 b1t3 b1t4 b1t1)
1839+Leading(b2t3 b2t4 b2t1 b2t2)
1840+Leading(b3t4 b3t1 b3t2 b3t3)
18221841 not used hint:
18231842 duplication hint:
18241843 error hint:
@@ -1963,7 +1982,9 @@ AND bmt1.c1 = c2.c1
19631982 (53 rows)
19641983
19651984 /*+
1966-Leading(c2 c1 bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2)
1985+Leading(c2 c1 bmt1 bmt2 bmt3 bmt4)
1986+Leading(b1t2 b1t3 b1t4 b1t1)
1987+Leading(b2t3 b2t4 b2t1 b2t2)
19671988 */
19681989 EXPLAIN (COSTS false)
19691990 WITH c1 (c1) AS (
@@ -1980,7 +2001,9 @@ AND bmt1.c1 = c2.c1
19802001 ;
19812002 LOG: pg_hint_plan:
19822003 used hint:
1983-Leading(c2 c1 bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2)
2004+Leading(c2 c1 bmt1 bmt2 bmt3 bmt4)
2005+Leading(b1t2 b1t3 b1t4 b1t1)
2006+Leading(b2t3 b2t4 b2t1 b2t2)
19842007 not used hint:
19852008 duplication hint:
19862009 error hint:
@@ -2137,7 +2160,10 @@ AND bmt1.c1 = c3.c1
21372160 (72 rows)
21382161
21392162 /*+
2140-Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2 b3t4 b3t1 b3t2 b3t3)
2163+Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2164+Leading(b1t2 b1t3 b1t4 b1t1)
2165+Leading(b2t3 b2t4 b2t1 b2t2)
2166+Leading(b3t4 b3t1 b3t2 b3t3)
21412167 */
21422168 EXPLAIN (COSTS false)
21432169 WITH c1 (c1) AS (
@@ -2158,7 +2184,10 @@ AND bmt1.c1 = c3.c1
21582184 ;
21592185 LOG: pg_hint_plan:
21602186 used hint:
2161-Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4 b1t2 b1t3 b1t4 b1t1 b2t3 b2t4 b2t1 b2t2 b3t4 b3t1 b3t2 b3t3)
2187+Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2188+Leading(b1t2 b1t3 b1t4 b1t1)
2189+Leading(b2t3 b2t4 b2t1 b2t2)
2190+Leading(b3t4 b3t1 b3t2 b3t3)
21622191 not used hint:
21632192 duplication hint:
21642193 error hint:
@@ -2287,7 +2316,7 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1 WHERE b3t1.ctid = '(1,1)' AND b3t1.c1 = 1
22872316 (27 rows)
22882317
22892318 /*+
2290-Leading(c1 bmt1 b1t1 b2t1 b3t1)
2319+Leading(c1 bmt1)
22912320 */
22922321 EXPLAIN (COSTS false)
22932322 WITH c1 (c1) AS (
@@ -2303,7 +2332,7 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1 WHERE b3t1.ctid = '(1,1)' AND b3t1.c1 = 1
23032332 ;
23042333 LOG: pg_hint_plan:
23052334 used hint:
2306-Leading(c1 bmt1 b1t1 b2t1 b3t1)
2335+Leading(c1 bmt1)
23072336 not used hint:
23082337 duplication hint:
23092338 error hint:
@@ -2393,7 +2422,10 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2 WHERE b3t1.ctid = '(1,1)' AND b3
23932422 (35 rows)
23942423
23952424 /*+
2396-Leading(c1 bmt2 b1t2 b2t2 b3t2 bmt1 b1t1 b2t1 b3t1)
2425+Leading(c1 bmt2 bmt1)
2426+Leading(b1t2 b1t1)
2427+Leading(b2t2 b2t1)
2428+Leading(b3t2 b3t1)
23972429 */
23982430 EXPLAIN (COSTS false)
23992431 WITH c1 (c1) AS (
@@ -2410,7 +2442,10 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2 WHERE b3t1.ctid = '(1,1)' AND b3
24102442 ;
24112443 LOG: pg_hint_plan:
24122444 used hint:
2413-Leading(c1 bmt2 b1t2 b2t2 b3t2 bmt1 b1t1 b2t1 b3t1)
2445+Leading(c1 bmt2 bmt1)
2446+Leading(b1t2 b1t1)
2447+Leading(b2t2 b2t1)
2448+Leading(b3t2 b3t1)
24142449 not used hint:
24152450 duplication hint:
24162451 error hint:
@@ -2539,7 +2574,10 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3
25392574 (67 rows)
25402575
25412576 /*+
2542-Leading(c1 bmt4 b1t4 b2t4 b3t4 bmt3 b1t3 b2t3 b3t3 bmt2 b1t2 b2t2 b3t2 bmt1 b1t1 b2t1 b3t1)
2577+Leading(c1 bmt4 bmt3 bmt2 bmt1)
2578+Leading(b1t4 b1t3 b1t2 b1t1)
2579+Leading(b2t4 b2t3 b2t2 b2t1)
2580+Leading(b3t4 b3t3 b3t2 b3t1)
25432581 */
25442582 EXPLAIN (COSTS false)
25452583 WITH c1 (c1) AS (
@@ -2555,7 +2593,10 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3
25552593 ;
25562594 LOG: pg_hint_plan:
25572595 used hint:
2558-Leading(c1 bmt4 b1t4 b2t4 b3t4 bmt3 b1t3 b2t3 b3t3 bmt2 b1t2 b2t2 b3t2 bmt1 b1t1 b2t1 b3t1)
2596+Leading(c1 bmt4 bmt3 bmt2 bmt1)
2597+Leading(b1t4 b1t3 b1t2 b1t1)
2598+Leading(b2t4 b2t3 b2t2 b2t1)
2599+Leading(b3t4 b3t3 b3t2 b3t1)
25592600 not used hint:
25602601 duplication hint:
25612602 error hint:
@@ -2695,7 +2736,8 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1 WHERE b3t1.ctid = '(1,1)'
26952736 (46 rows)
26962737
26972738 /*+
2698-Leading(c1 bmt4 b1t4 bmt3 b1t3 bmt2 b1t2 bmt1 b1t1 b2t1 b3t1)
2739+Leading(c1 bmt4 bmt3 bmt2 bmt1)
2740+Leading(b1t4 b1t3 b1t2 b1t1)
26992741 */
27002742 EXPLAIN (COSTS false)
27012743 WITH c1 (c1) AS (
@@ -2711,7 +2753,8 @@ SELECT max(b3t1.c1) FROM s1.t1 b3t1 WHERE b3t1.ctid = '(1,1)'
27112753 ;
27122754 LOG: pg_hint_plan:
27132755 used hint:
2714-Leading(c1 bmt4 b1t4 bmt3 b1t3 bmt2 b1t2 bmt1 b1t1 b2t1 b3t1)
2756+Leading(c1 bmt4 bmt3 bmt2 bmt1)
2757+Leading(b1t4 b1t3 b1t2 b1t1)
27152758 not used hint:
27162759 duplication hint:
27172760 error hint:
@@ -3030,22 +3073,24 @@ EXPLAIN (COSTS false) UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
30303073 TID Cond: (ctid = '(1,1)'::tid)
30313074 (39 rows)
30323075
3033-/*+Leading(
3034-b1t1 b1t2 b1t3 b1t4
3035-b2t1 b2t2 b2t3 b2t4 r2_
3036-) */
3076+/*+
3077+Leading(b1t1 b1t2 b1t3 b1t4 r2_)
3078+Leading(b2t1 b2t2 b2t3 b2t4 r2_)
3079+*/
30373080 EXPLAIN (COSTS false) UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
30383081 LOG: pg_hint_plan:
30393082 used hint:
3040-Leading(b1t1 b1t2 b1t3 b1t4 b2t1 b2t2 b2t3 b2t4 r2_)
3083+Leading(b1t1 b1t2 b1t3 b1t4 r2_)
30413084 not used hint:
3085+Leading(b2t1 b2t2 b2t3 b2t4 r2_)
30423086 duplication hint:
30433087 error hint:
30443088
30453089 LOG: pg_hint_plan:
30463090 used hint:
3047-Leading(b1t1 b1t2 b1t3 b1t4 b2t1 b2t2 b2t3 b2t4 r2_)
3091+Leading(b2t1 b2t2 b2t3 b2t4 r2_)
30483092 not used hint:
3093+Leading(b1t1 b1t2 b1t3 b1t4 r2_)
30493094 duplication hint:
30503095 error hint:
30513096
@@ -3307,30 +3352,36 @@ EXPLAIN (COSTS false) UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
33073352 TID Cond: (ctid = '(1,1)'::tid)
33083353 (59 rows)
33093354
3310-/*+Leading(
3311-b1t1 b1t2 b1t3 b1t4
3312-b2t1 b2t2 b2t3 b2t4
3313-b3t1 b3t2 b3t3 b3t4 r3_
3314-) */
3355+/*+
3356+Leading(b1t1 b1t2 b1t3 b1t4 r3_)
3357+Leading(b2t1 b2t2 b2t3 b2t4 r3_)
3358+Leading(b3t1 b3t2 b3t3 b3t4 r3_)
3359+*/
33153360 EXPLAIN (COSTS false) UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
33163361 LOG: pg_hint_plan:
33173362 used hint:
3318-Leading(b1t1 b1t2 b1t3 b1t4 b2t1 b2t2 b2t3 b2t4 b3t1 b3t2 b3t3 b3t4 r3_)
3363+Leading(b1t1 b1t2 b1t3 b1t4 r3_)
33193364 not used hint:
3365+Leading(b2t1 b2t2 b2t3 b2t4 r3_)
3366+Leading(b3t1 b3t2 b3t3 b3t4 r3_)
33203367 duplication hint:
33213368 error hint:
33223369
33233370 LOG: pg_hint_plan:
33243371 used hint:
3325-Leading(b1t1 b1t2 b1t3 b1t4 b2t1 b2t2 b2t3 b2t4 b3t1 b3t2 b3t3 b3t4 r3_)
3372+Leading(b2t1 b2t2 b2t3 b2t4 r3_)
33263373 not used hint:
3374+Leading(b1t1 b1t2 b1t3 b1t4 r3_)
3375+Leading(b3t1 b3t2 b3t3 b3t4 r3_)
33273376 duplication hint:
33283377 error hint:
33293378
33303379 LOG: pg_hint_plan:
33313380 used hint:
3332-Leading(b1t1 b1t2 b1t3 b1t4 b2t1 b2t2 b2t3 b2t4 b3t1 b3t2 b3t3 b3t4 r3_)
3381+Leading(b3t1 b3t2 b3t3 b3t4 r3_)
33333382 not used hint:
3383+Leading(b1t1 b1t2 b1t3 b1t4 r3_)
3384+Leading(b2t1 b2t2 b2t3 b2t4 r3_)
33343385 duplication hint:
33353386 error hint:
33363387
@@ -3540,23 +3591,24 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1,
35403591 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;
35413592 LOG: pg_hint_plan:
35423593 used hint:
3543-Leading(t3 t1 t2)
35443594 not used hint:
3595+Leading(t3 t1 t2)
35453596 duplication hint:
35463597 error hint:
35473598
3548- QUERY PLAN
3549----------------------------------------------
3550- Nested Loop
3551- Join Filter: (t1.c1 = "*VALUES*".column1)
3552- -> Values Scan on "*VALUES*"
3553- -> Merge Join
3554- Merge Cond: (t1.c1 = t2.c1)
3555- -> Index Scan using t1_i1 on t1
3556- -> Sort
3557- Sort Key: t2.c1
3599+ QUERY PLAN
3600+-------------------------------------------------------
3601+ Merge Join
3602+ Merge Cond: (t1.c1 = t2.c1)
3603+ -> Index Scan using t1_i1 on t1
3604+ -> Sort
3605+ Sort Key: t2.c1
3606+ -> Hash Join
3607+ Hash Cond: (t2.c1 = "*VALUES*".column1)
35583608 -> Seq Scan on t2
3559-(9 rows)
3609+ -> Hash
3610+ -> Values Scan on "*VALUES*"
3611+(10 rows)
35603612
35613613 /*+ Leading(*VALUES* t1 t2) */
35623614 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;
@@ -3602,26 +3654,27 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1,
36023654 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;
36033655 LOG: pg_hint_plan:
36043656 used hint:
3605-Leading(t4 t3 t2 t1)
36063657 not used hint:
3658+Leading(t4 t3 t2 t1)
36073659 duplication hint:
36083660 error hint:
36093661
3610- QUERY PLAN
3611-----------------------------------------------------------------
3662+ QUERY PLAN
3663+-------------------------------------------------------------
36123664 Nested Loop
36133665 Join Filter: (t1.c1 = "*VALUES*".column1)
3614- -> Nested Loop
3615- Join Filter: ("*VALUES*".column1 = "*VALUES*".column1)
3616- -> Values Scan on "*VALUES*"
3617- -> Values Scan on "*VALUES*"
36183666 -> Merge Join
36193667 Merge Cond: (t1.c1 = t2.c1)
36203668 -> Index Scan using t1_i1 on t1
36213669 -> Sort
36223670 Sort Key: t2.c1
3623- -> Seq Scan on t2
3624-(12 rows)
3671+ -> Hash Join
3672+ Hash Cond: (t2.c1 = "*VALUES*".column1)
3673+ -> Seq Scan on t2
3674+ -> Hash
3675+ -> Values Scan on "*VALUES*"
3676+ -> Values Scan on "*VALUES*"
3677+(13 rows)
36253678
36263679 /*+ Leading(*VALUES* t3 t2 t1) */
36273680 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;
@@ -3630,9 +3683,9 @@ DETAIL: Relation name "*VALUES*" is ambiguous.
36303683 LOG: pg_hint_plan:
36313684 used hint:
36323685 not used hint:
3633-Leading(*VALUES* t3 t2 t1)
36343686 duplication hint:
36353687 error hint:
3688+Leading(*VALUES* t3 t2 t1)
36363689
36373690 QUERY PLAN
36383691 -------------------------------------------------------------
Show on old repository browser