2 SET pg_hint_plan.enable_hint TO on;
3 SET pg_hint_plan.debug_print TO on;
4 SET client_min_messages TO LOG;
5 SET search_path TO public;
8 ---- No.A-2-1 uninstall
18 ---- No. A-5-1 comment pattern
22 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
38 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
40 ------------------------------
41 Index Scan using t1_i1 on t1
47 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
49 ------------------------------
50 Index Scan using t1_i1 on t1
56 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
58 ------------------------------
59 Index Scan using t1_i1 on t1
65 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
67 ------------------------------
68 Index Scan using t1_i1 on t1
74 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
76 ------------------------------
77 Index Scan using t1_i1 on t1
82 /*+SeqScan(t1) /* nest comment */ */
83 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
84 INFO: hint syntax error at or near "/* nest comment */ */
85 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
86 DETAIL: Nested block comments are not supported.
88 ------------------------------
89 Index Scan using t1_i1 on t1
94 /* +SeqScan(t1) /* nest comment */ */
95 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
97 ------------------------------
98 Index Scan using t1_i1 on t1
103 /*SeqScan(t1) /* nest comment */ */
104 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
106 ------------------------------
107 Index Scan using t1_i1 on t1
112 ---- No. A-5-2 hint position
116 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
133 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
135 ------------------------------
136 Index Scan using t1_i1 on t1
141 EXPLAIN (COSTS false) SELECT /*+SeqScan(t1)*/ * FROM s1.t1 WHERE t1.c1 = 1;
143 ------------------------------
144 Index Scan using t1_i1 on t1
151 ---- No. A-6-1 hint's table definition
157 ---- No. A-6-2 search condition
168 ---- No. A-6-3 number of constant
177 ---- No. A-7-2 hint delimiter
179 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
181 ------------------------------
182 Index Scan using t1_i1 on t1
193 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
194 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
197 Set(enable_bitmapscan off)
198 Set(enable_indexscan off)
210 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
211 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
214 Set(enable_bitmapscan off)
215 Set(enable_indexscan off)
227 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
228 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
231 Set(enable_bitmapscan off)
232 Set(enable_indexscan off)
244 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
245 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
248 Set(enable_bitmapscan off)
249 Set(enable_indexscan off)
261 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
262 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
265 Set(enable_bitmapscan off)
266 Set(enable_indexscan off)
278 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
279 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
282 Set(enable_bitmapscan off)
283 Set(enable_indexscan off)
295 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
296 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
299 Set(enable_bitmapscan off)
300 Set(enable_indexscan off)
312 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
313 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
316 Set(enable_bitmapscan off)
317 Set(enable_indexscan off)
329 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
330 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
333 Set(enable_bitmapscan off)
334 Set(enable_indexscan off)
346 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
347 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
350 Set(enable_bitmapscan off)
351 Set(enable_indexscan off)
363 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
364 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
367 Set(enable_bitmapscan off)
368 Set(enable_indexscan off)
380 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
381 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
384 Set(enable_bitmapscan off)
385 Set(enable_indexscan off)
397 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
398 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
401 Set(enable_bitmapscan off)
402 Set(enable_indexscan off)
414 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
415 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
418 Set(enable_bitmapscan off)
419 Set(enable_indexscan off)
431 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
432 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
435 Set(enable_bitmapscan off)
436 Set(enable_indexscan off)
449 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
450 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
453 Set(enable_bitmapscan off)
454 Set(enable_indexscan off)
466 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
468 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
471 Set(enable_bitmapscan off)
472 Set(enable_indexscan off)
486 (enable_indexscan"off")
488 (enable_bitmapscan"off")*/
489 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
492 Set(enable_bitmapscan off)
493 Set(enable_indexscan off)
507 enable_indexscan"off")Set
509 enable_bitmapscan"off")*/
510 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
513 Set(enable_bitmapscan off)
514 Set(enable_indexscan off)
526 /*+Set(enable_indexscan"off"
528 Set(enable_bitmapscan"off"
531 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
534 Set(enable_bitmapscan off)
535 Set(enable_indexscan off)
554 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
557 Set(enable_bitmapscan off)
558 Set(enable_indexscan off)
582 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
585 Set(enable_bitmapscan off)
586 Set(enable_indexscan off)
599 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
600 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
603 Set(enable_bitmapscan off)
604 Set(enable_indexscan off)
616 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
618 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
621 Set(enable_bitmapscan off)
622 Set(enable_indexscan off)
636 (enable_indexscan"off")
638 (enable_bitmapscan"off")*/
639 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
642 Set(enable_bitmapscan off)
643 Set(enable_indexscan off)
657 enable_indexscan"off")Set
659 enable_bitmapscan"off")*/
660 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
663 Set(enable_bitmapscan off)
664 Set(enable_indexscan off)
676 /*+Set(enable_indexscan"off"
678 Set(enable_bitmapscan"off"
681 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
684 Set(enable_bitmapscan off)
685 Set(enable_indexscan off)
704 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
707 Set(enable_bitmapscan off)
708 Set(enable_indexscan off)
732 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
735 Set(enable_bitmapscan off)
736 Set(enable_indexscan off)
748 ---- No. A-7-3 hint object pattern
749 ---- No. A-9-2 message object pattern
754 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
769 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
784 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
799 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
816 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
831 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
840 ----------------------
846 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
861 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
870 ----------------------
878 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
893 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
902 ----------------------
908 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
923 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
932 ----------------------
940 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
941 INFO: hint syntax error at or near ")"
942 DETAIL: SeqScan hint requires a relation.
943 INFO: hint syntax error at or near ")"
944 DETAIL: Unrecognized hint keyword ")".
953 ----------------------------------
954 Index Scan using t1_i1 on t1 ")"
959 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
974 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")))" WHERE ")))".c1 = 1;
983 ----------------------
991 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
992 INFO: hint syntax error at or near ""
993 DETAIL: Unterminated quoted string.
995 -----------------------------------
996 Index Scan using t1_i1 on t1 """"
1001 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
1010 ---------------------
1015 /*+SeqScan("""""""")*/
1016 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """""""" WHERE """""""".c1 = 1;
1025 -------------------------
1026 Seq Scan on t1 """"""""
1033 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1034 INFO: hint syntax error at or near ""
1035 DETAIL: SeqScan hint requires a relation.
1044 ----------------------------------
1045 Index Scan using t1_i1 on t1 " "
1046 Index Cond: (c1 = 1)
1050 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1059 --------------------
1065 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1074 ----------------------
1082 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1083 INFO: hint syntax error at or near ""
1084 DETAIL: SeqScan hint requires a relation.
1093 -----------------------------------
1094 Index Scan using t1_i1 on t1 " "
1095 Index Cond: (c1 = 1)
1099 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1108 ---------------------------
1114 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1123 -------------------------------------------
1132 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1135 INFO: hint syntax error at or near ""
1136 DETAIL: SeqScan hint requires a relation.
1145 --------------------------------
1146 Index Scan using t1_i1 on t1 "
1148 Index Cond: (c1 = 1)
1153 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1165 --------------------
1175 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1193 --------------------
1204 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1213 ----------------------
1214 Seq Scan on t1 "Set"
1219 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1228 ----------------------
1229 Seq Scan on t1 "Set"
1233 /*+SeqScan("Set SeqScan Leading")*/
1234 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set SeqScan Leading" WHERE "Set SeqScan Leading".c1 = 1;
1237 SeqScan("Set SeqScan Leading")
1243 --------------------------------------
1244 Seq Scan on t1 "Set SeqScan Leading"
1251 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1260 ---------------------
1266 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1275 -------------------------
1276 Seq Scan on t1 "あいう"
1281 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1290 ---------------------
1296 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1305 -------------------------
1306 Seq Scan on t1 "あいう"
1313 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;
1314 INFO: hint syntax error at or near "/**/)*/
1315 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;"
1316 DETAIL: Nested block comments are not supported.
1318 -------------------------------------
1319 Index Scan using t1_i1 on t1 "/**/"
1320 Index Cond: (c1 = 1)
1323 /*+SeqScan(/**//**//**/)*/
1324 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;
1325 INFO: hint syntax error at or near "/**//**//**/)*/
1326 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;"
1327 DETAIL: Nested block comments are not supported.
1329 ---------------------------------------------
1330 Index Scan using t1_i1 on t1 "/**//**//**/"
1331 Index Cond: (c1 = 1)
1338 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1339 Set/**/あ" WHERE "tT()""
1341 INFO: hint syntax error at or near "/**/あ")*/
1342 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1343 Set/**/あ" WHERE "tT()""
1345 DETAIL: Nested block comments are not supported.
1347 ------------------------------------------
1348 Index Scan using t1_i1 on t1 "tT()""
1350 Index Cond: (c1 = 1)
1356 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1368 --------------------------
1369 Seq Scan on t1 "tT()""
1375 ---- No. A-7-4 hint parse error
1378 /*+Set(enable_indexscan off)Set enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1379 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1380 INFO: hint syntax error at or near "enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1381 DETAIL: Opening parenthesis is necessary.
1384 Set(enable_indexscan off)
1390 ----------------------------------
1391 Bitmap Heap Scan on t1
1392 Recheck Cond: (c1 = 1)
1393 -> Bitmap Index Scan on t1_i1
1394 Index Cond: (c1 = 1)
1398 /*+Set(enable_indexscan off)Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)*/
1399 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1400 INFO: hint syntax error at or near "Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)"
1401 DETAIL: Set hint requires name and value of GUC parameter.
1405 Set(enable_indexscan off)
1409 Set(enable_tidscan off Set(enable_bitmapscan off)
1412 --------------------
1418 /*+Set(enable_indexscan off)Set(enable_tidscan "off)Set(enable_bitmapscan off)SeqScan(t1)*/
1419 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1420 INFO: hint syntax error at or near ""
1421 DETAIL: Unterminated quoted string.
1424 Set(enable_indexscan off)
1430 ----------------------------------
1431 Bitmap Heap Scan on t1
1432 Recheck Cond: (c1 = 1)
1433 -> Bitmap Index Scan on t1_i1
1434 Index Cond: (c1 = 1)
1438 /*+Set(enable_indexscan off)SeqScan("")Set(enable_bitmapscan off)*/
1439 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1440 INFO: hint syntax error at or near ")Set(enable_bitmapscan off)"
1441 DETAIL: Zero-length delimited string.
1444 Set(enable_indexscan off)
1450 ----------------------------------
1451 Bitmap Heap Scan on t1
1452 Recheck Cond: (c1 = 1)
1453 -> Bitmap Index Scan on t1_i1
1454 Index Cond: (c1 = 1)
1458 /*+Set(enable_indexscan off)NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1459 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1460 INFO: hint syntax error at or near "NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1461 DETAIL: Unrecognized hint keyword "NoSet".
1464 Set(enable_indexscan off)
1470 ----------------------------------
1471 Bitmap Heap Scan on t1
1472 Recheck Cond: (c1 = 1)
1473 -> Bitmap Index Scan on t1_i1
1474 Index Cond: (c1 = 1)
1478 /*+Set(enable_indexscan off)"Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1479 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1480 INFO: hint syntax error at or near ""Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1481 DETAIL: Unrecognized hint keyword ""Set"".
1484 Set(enable_indexscan off)
1490 ----------------------------------
1491 Bitmap Heap Scan on t1
1492 Recheck Cond: (c1 = 1)
1493 -> Bitmap Index Scan on t1_i1
1494 Index Cond: (c1 = 1)
1498 /*+Set(enable_indexscan off)Set(enable_tidscan /* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1499 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1500 INFO: hint syntax error at or near "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1501 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
1502 DETAIL: Nested block comments are not supported.
1504 ------------------------------
1505 Index Scan using t1_i1 on t1
1506 Index Cond: (c1 = 1)
1510 ---- No. A-8-1 original GUC parameter
1513 SET ROLE super_user;
1514 SET pg_hint_plan.debug_print TO off;
1515 SHOW pg_hint_plan.enable_hint;
1516 pg_hint_plan.enable_hint
1517 --------------------------
1521 SHOW pg_hint_plan.debug_print;
1522 pg_hint_plan.debug_print
1523 --------------------------
1527 SHOW pg_hint_plan.parse_messages;
1528 pg_hint_plan.parse_messages
1529 -----------------------------
1533 SET pg_hint_plan.enable_hint TO off;
1534 SET pg_hint_plan.debug_print TO on;
1535 SET pg_hint_plan.parse_messages TO error;
1536 SHOW pg_hint_plan.enable_hint;
1537 pg_hint_plan.enable_hint
1538 --------------------------
1542 SHOW pg_hint_plan.debug_print;
1543 pg_hint_plan.debug_print
1544 --------------------------
1548 SHOW pg_hint_plan.parse_messages;
1549 pg_hint_plan.parse_messages
1550 -----------------------------
1554 RESET pg_hint_plan.enable_hint;
1555 RESET pg_hint_plan.debug_print;
1556 RESET pg_hint_plan.parse_messages;
1557 SHOW pg_hint_plan.enable_hint;
1558 pg_hint_plan.enable_hint
1559 --------------------------
1563 SHOW pg_hint_plan.debug_print;
1564 pg_hint_plan.debug_print
1565 --------------------------
1569 SHOW pg_hint_plan.parse_messages;
1570 pg_hint_plan.parse_messages
1571 -----------------------------
1576 SET ROLE normal_user;
1577 SHOW pg_hint_plan.enable_hint;
1578 pg_hint_plan.enable_hint
1579 --------------------------
1583 SHOW pg_hint_plan.debug_print;
1584 pg_hint_plan.debug_print
1585 --------------------------
1589 SHOW pg_hint_plan.parse_messages;
1590 pg_hint_plan.parse_messages
1591 -----------------------------
1595 SET pg_hint_plan.enable_hint TO off;
1596 SET pg_hint_plan.debug_print TO on;
1597 SET pg_hint_plan.parse_messages TO error;
1598 SHOW pg_hint_plan.enable_hint;
1599 pg_hint_plan.enable_hint
1600 --------------------------
1604 SHOW pg_hint_plan.debug_print;
1605 pg_hint_plan.debug_print
1606 --------------------------
1610 SHOW pg_hint_plan.parse_messages;
1611 pg_hint_plan.parse_messages
1612 -----------------------------
1616 RESET pg_hint_plan.enable_hint;
1617 RESET pg_hint_plan.debug_print;
1618 RESET pg_hint_plan.parse_messages;
1619 SHOW pg_hint_plan.enable_hint;
1620 pg_hint_plan.enable_hint
1621 --------------------------
1625 SHOW pg_hint_plan.debug_print;
1626 pg_hint_plan.debug_print
1627 --------------------------
1631 SHOW pg_hint_plan.parse_messages;
1632 pg_hint_plan.parse_messages
1633 -----------------------------
1639 ---- No. A-8-2 original GUC parameter pg_hint_plan.enable_hint
1642 SET pg_hint_plan.enable_hint TO on;
1643 SHOW pg_hint_plan.enable_hint;
1644 pg_hint_plan.enable_hint
1645 --------------------------
1649 /*+Set(enable_indexscan off)*/
1650 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1652 ----------------------------------
1653 Bitmap Heap Scan on t1
1654 Recheck Cond: (c1 = 1)
1655 -> Bitmap Index Scan on t1_i1
1656 Index Cond: (c1 = 1)
1660 SET pg_hint_plan.enable_hint TO off;
1661 SHOW pg_hint_plan.enable_hint;
1662 pg_hint_plan.enable_hint
1663 --------------------------
1667 /*+Set(enable_indexscan off)*/
1668 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1670 ------------------------------
1671 Index Scan using t1_i1 on t1
1672 Index Cond: (c1 = 1)
1676 SET pg_hint_plan.enable_hint TO DEFAULT;
1677 SHOW pg_hint_plan.enable_hint;
1678 pg_hint_plan.enable_hint
1679 --------------------------
1683 /*+Set(enable_indexscan off)*/
1684 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1686 ----------------------------------
1687 Bitmap Heap Scan on t1
1688 Recheck Cond: (c1 = 1)
1689 -> Bitmap Index Scan on t1_i1
1690 Index Cond: (c1 = 1)
1694 SET pg_hint_plan.enable_hint TO enable;
1695 ERROR: parameter "pg_hint_plan.enable_hint" requires a Boolean value
1696 SHOW pg_hint_plan.enable_hint;
1697 pg_hint_plan.enable_hint
1698 --------------------------
1703 ---- No. A-8-3 original GUC parameter pg_hint_plan.debug_print
1706 SET pg_hint_plan.debug_print TO on;
1707 SHOW pg_hint_plan.debug_print;
1708 pg_hint_plan.debug_print
1709 --------------------------
1713 /*+Set(enable_indexscan off)*/
1714 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1717 Set(enable_indexscan off)
1723 ----------------------------------
1724 Bitmap Heap Scan on t1
1725 Recheck Cond: (c1 = 1)
1726 -> Bitmap Index Scan on t1_i1
1727 Index Cond: (c1 = 1)
1731 SET pg_hint_plan.debug_print TO off;
1732 SHOW pg_hint_plan.debug_print;
1733 pg_hint_plan.debug_print
1734 --------------------------
1738 /*+Set(enable_indexscan off)*/
1739 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1741 ----------------------------------
1742 Bitmap Heap Scan on t1
1743 Recheck Cond: (c1 = 1)
1744 -> Bitmap Index Scan on t1_i1
1745 Index Cond: (c1 = 1)
1749 SET pg_hint_plan.debug_print TO DEFAULT;
1750 SHOW pg_hint_plan.debug_print;
1751 pg_hint_plan.debug_print
1752 --------------------------
1756 /*+Set(enable_indexscan off)*/
1757 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1759 ----------------------------------
1760 Bitmap Heap Scan on t1
1761 Recheck Cond: (c1 = 1)
1762 -> Bitmap Index Scan on t1_i1
1763 Index Cond: (c1 = 1)
1767 SET pg_hint_plan.debug_print TO enable;
1768 ERROR: parameter "pg_hint_plan.debug_print" requires a Boolean value
1769 SHOW pg_hint_plan.debug_print;
1770 pg_hint_plan.debug_print
1771 --------------------------
1776 ---- No. A-8-4 original GUC parameter pg_hint_plan.parse_messages
1778 SET client_min_messages TO debug5;
1779 DEBUG: CommitTransactionCommand
1780 DEBUG: CommitTransaction
1781 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1783 SET pg_hint_plan.parse_messages TO debug5;
1784 DEBUG: StartTransactionCommand
1785 DEBUG: StartTransaction
1786 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1787 DEBUG: ProcessUtility
1788 DEBUG: CommitTransactionCommand
1789 DEBUG: CommitTransaction
1790 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1791 SHOW pg_hint_plan.parse_messages;
1792 DEBUG: StartTransactionCommand
1793 DEBUG: StartTransaction
1794 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1795 DEBUG: ProcessUtility
1796 DEBUG: CommitTransactionCommand
1797 DEBUG: CommitTransaction
1798 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1799 pg_hint_plan.parse_messages
1800 -----------------------------
1805 DEBUG: StartTransactionCommand
1806 DEBUG: StartTransaction
1807 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1808 DEBUG: hint syntax error at or near ""
1809 DETAIL: Opening parenthesis is necessary.
1810 DEBUG: CommitTransactionCommand
1811 DEBUG: CommitTransaction
1812 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1818 SET client_min_messages TO debug4;
1819 DEBUG: StartTransactionCommand
1820 DEBUG: StartTransaction
1821 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1822 DEBUG: ProcessUtility
1823 DEBUG: CommitTransactionCommand
1824 DEBUG: CommitTransaction
1825 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1827 DEBUG: StartTransactionCommand
1828 DEBUG: StartTransaction
1829 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1830 DEBUG: CommitTransactionCommand
1831 DEBUG: CommitTransaction
1832 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1839 SET pg_hint_plan.parse_messages TO debug4;
1840 DEBUG: StartTransactionCommand
1841 DEBUG: StartTransaction
1842 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1843 DEBUG: ProcessUtility
1844 DEBUG: CommitTransactionCommand
1845 DEBUG: CommitTransaction
1846 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1847 SHOW pg_hint_plan.parse_messages;
1848 DEBUG: StartTransactionCommand
1849 DEBUG: StartTransaction
1850 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1851 DEBUG: ProcessUtility
1852 DEBUG: CommitTransactionCommand
1853 DEBUG: CommitTransaction
1854 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1855 pg_hint_plan.parse_messages
1856 -----------------------------
1861 DEBUG: StartTransactionCommand
1862 DEBUG: StartTransaction
1863 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1864 DEBUG: hint syntax error at or near ""
1865 DETAIL: Opening parenthesis is necessary.
1866 DEBUG: CommitTransactionCommand
1867 DEBUG: CommitTransaction
1868 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1874 SET client_min_messages TO debug3;
1875 DEBUG: StartTransactionCommand
1876 DEBUG: StartTransaction
1877 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1878 DEBUG: ProcessUtility
1879 DEBUG: CommitTransactionCommand
1880 DEBUG: CommitTransaction
1881 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1883 DEBUG: StartTransactionCommand
1884 DEBUG: StartTransaction
1885 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1886 DEBUG: CommitTransactionCommand
1887 DEBUG: CommitTransaction
1888 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1895 SET pg_hint_plan.parse_messages TO debug3;
1896 DEBUG: StartTransactionCommand
1897 DEBUG: StartTransaction
1898 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1899 DEBUG: ProcessUtility
1900 DEBUG: CommitTransactionCommand
1901 DEBUG: CommitTransaction
1902 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1903 SHOW pg_hint_plan.parse_messages;
1904 DEBUG: StartTransactionCommand
1905 DEBUG: StartTransaction
1906 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1907 DEBUG: ProcessUtility
1908 DEBUG: CommitTransactionCommand
1909 DEBUG: CommitTransaction
1910 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1911 pg_hint_plan.parse_messages
1912 -----------------------------
1917 DEBUG: StartTransactionCommand
1918 DEBUG: StartTransaction
1919 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1920 DEBUG: hint syntax error at or near ""
1921 DETAIL: Opening parenthesis is necessary.
1922 DEBUG: CommitTransactionCommand
1923 DEBUG: CommitTransaction
1924 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1930 SET client_min_messages TO debug2;
1931 DEBUG: StartTransactionCommand
1932 DEBUG: StartTransaction
1933 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1934 DEBUG: ProcessUtility
1942 SET pg_hint_plan.parse_messages TO debug2;
1943 SHOW pg_hint_plan.parse_messages;
1944 pg_hint_plan.parse_messages
1945 -----------------------------
1950 DEBUG: hint syntax error at or near ""
1951 DETAIL: Opening parenthesis is necessary.
1957 SET client_min_messages TO debug1;
1965 SET pg_hint_plan.parse_messages TO debug1;
1966 SHOW pg_hint_plan.parse_messages;
1967 pg_hint_plan.parse_messages
1968 -----------------------------
1973 DEBUG: hint syntax error at or near ""
1974 DETAIL: Opening parenthesis is necessary.
1980 SET client_min_messages TO log;
1988 SET pg_hint_plan.parse_messages TO log;
1989 SHOW pg_hint_plan.parse_messages;
1990 pg_hint_plan.parse_messages
1991 -----------------------------
1996 LOG: hint syntax error at or near ""
1997 DETAIL: Opening parenthesis is necessary.
2003 SET client_min_messages TO info;
2011 SET pg_hint_plan.parse_messages TO info;
2012 SHOW pg_hint_plan.parse_messages;
2013 pg_hint_plan.parse_messages
2014 -----------------------------
2019 INFO: hint syntax error at or near ""
2020 DETAIL: Opening parenthesis is necessary.
2026 SET client_min_messages TO notice;
2028 INFO: hint syntax error at or near ""
2029 DETAIL: Opening parenthesis is necessary.
2036 SET pg_hint_plan.parse_messages TO notice;
2037 SHOW pg_hint_plan.parse_messages;
2038 pg_hint_plan.parse_messages
2039 -----------------------------
2044 NOTICE: hint syntax error at or near ""
2045 DETAIL: Opening parenthesis is necessary.
2051 SET client_min_messages TO warning;
2059 SET pg_hint_plan.parse_messages TO warning;
2060 SHOW pg_hint_plan.parse_messages;
2061 pg_hint_plan.parse_messages
2062 -----------------------------
2067 WARNING: hint syntax error at or near ""
2068 DETAIL: Opening parenthesis is necessary.
2074 SET client_min_messages TO error;
2082 SET pg_hint_plan.parse_messages TO error;
2083 SHOW pg_hint_plan.parse_messages;
2084 pg_hint_plan.parse_messages
2085 -----------------------------
2090 ERROR: hint syntax error at or near ""
2091 DETAIL: Opening parenthesis is necessary.
2092 SET client_min_messages TO fatal;
2095 RESET client_min_messages;
2096 SET pg_hint_plan.parse_messages TO DEFAULT;
2097 SHOW pg_hint_plan.parse_messages;
2098 pg_hint_plan.parse_messages
2099 -----------------------------
2104 INFO: hint syntax error at or near ""
2105 DETAIL: Opening parenthesis is necessary.
2112 SET pg_hint_plan.parse_messages TO fatal;
2113 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "fatal"
2114 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2115 SHOW pg_hint_plan.parse_messages;
2116 pg_hint_plan.parse_messages
2117 -----------------------------
2122 SET pg_hint_plan.parse_messages TO panic;
2123 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "panic"
2124 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2125 SHOW pg_hint_plan.parse_messages;
2126 pg_hint_plan.parse_messages
2127 -----------------------------
2132 SET pg_hint_plan.parse_messages TO on;
2133 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "on"
2134 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2135 SHOW pg_hint_plan.parse_messages;
2136 pg_hint_plan.parse_messages
2137 -----------------------------
2142 ---- No. A-8-5 original GUC parameter pg_hint_plan.enable_hint_table
2154 ---- No. A-9-1 parse error message output
2157 /*+"Set"(enable_indexscan on)*/SELECT 1;
2158 INFO: hint syntax error at or near ""Set"(enable_indexscan on)"
2159 DETAIL: Unrecognized hint keyword ""Set"".
2165 /*+Set()(enable_indexscan on)*/SELECT 1;
2166 INFO: hint syntax error at or near "Set()(enable_indexscan on)"
2167 DETAIL: Set hint requires name and value of GUC parameter.
2168 INFO: hint syntax error at or near "(enable_indexscan on)"
2169 DETAIL: Unrecognized hint keyword "".
2175 /*+Set(enable_indexscan on*/SELECT 1;
2176 INFO: hint syntax error at or near ""
2177 DETAIL: Closing parenthesis is necessary.
2184 ---- No. A-9-3 hint state output
2186 SET pg_hint_plan.debug_print TO on;
2187 SET client_min_messages TO LOG;
2190 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2199 --------------------
2205 /*+SeqScan(no_table)*/
2206 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2215 ------------------------------
2216 Index Scan using t1_i1 on t1
2217 Index Cond: (c1 = 1)
2221 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2223 -----------------------------------
2225 TID Cond: (ctid = '(1,1)'::tid)
2229 /*+TidScan(t1)BitmapScan(t1)*/
2230 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2231 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)"
2232 DETAIL: Conflict scan method hint.
2242 ----------------------------------
2243 Bitmap Heap Scan on t1
2244 Recheck Cond: (c1 = 1)
2245 Filter: (ctid = '(1,1)'::tid)
2246 -> Bitmap Index Scan on t1_i1
2247 Index Cond: (c1 = 1)
2250 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)*/
2251 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2252 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)"
2253 DETAIL: Conflict scan method hint.
2254 INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)"
2255 DETAIL: Conflict scan method hint.
2266 ---------------------------------
2267 Index Scan using t1_i1 on t1
2268 Index Cond: (c1 = 1)
2269 Filter: (ctid = '(1,1)'::tid)
2272 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)*/
2273 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2274 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2275 DETAIL: Conflict scan method hint.
2276 INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2277 DETAIL: Conflict scan method hint.
2278 INFO: hint syntax error at or near "IndexScan(t1)SeqScan(t1)"
2279 DETAIL: Conflict scan method hint.
2291 ------------------------------------------------
2293 Filter: ((c1 = 1) AND (ctid = '(1,1)'::tid))
2297 /*+Set(enable_indexscan enable)*/
2298 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2299 INFO: parameter "enable_indexscan" requires a Boolean value
2305 Set(enable_indexscan enable)
2308 ------------------------------
2309 Index Scan using t1_i1 on t1
2310 Index Cond: (c1 = 1)
2314 ---- No. A-10-1 hint state output
2316 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2317 EXPLAIN (COSTS false) EXECUTE p1;
2319 ------------------------------
2320 Index Scan using t1_i1 on t1
2321 Index Cond: (c1 = 1)
2325 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2326 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2328 ---------------------
2333 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2335 ---------------------
2340 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2342 ---------------------
2347 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2349 ---------------------
2354 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2356 ---------------------
2361 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2363 ---------------------
2372 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2381 EXPLAIN (COSTS false) EXECUTE p1;
2383 --------------------
2388 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2390 EXPLAIN (COSTS false) EXECUTE p1;
2399 --------------------
2406 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2415 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2417 ----------------------------------
2418 Bitmap Heap Scan on t1
2419 Recheck Cond: (c1 < $1)
2420 -> Bitmap Index Scan on t1_i1
2421 Index Cond: (c1 < $1)
2425 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2427 ----------------------------------
2428 Bitmap Heap Scan on t1
2429 Recheck Cond: (c1 < $1)
2430 -> Bitmap Index Scan on t1_i1
2431 Index Cond: (c1 < $1)
2435 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2437 ----------------------------------
2438 Bitmap Heap Scan on t1
2439 Recheck Cond: (c1 < $1)
2440 -> Bitmap Index Scan on t1_i1
2441 Index Cond: (c1 < $1)
2445 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2447 ----------------------------------
2448 Bitmap Heap Scan on t1
2449 Recheck Cond: (c1 < $1)
2450 -> Bitmap Index Scan on t1_i1
2451 Index Cond: (c1 < $1)
2455 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2457 ----------------------------------
2458 Bitmap Heap Scan on t1
2459 Recheck Cond: (c1 < $1)
2460 -> Bitmap Index Scan on t1_i1
2461 Index Cond: (c1 < $1)
2465 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2467 ----------------------------------
2468 Bitmap Heap Scan on t1
2469 Recheck Cond: (c1 < $1)
2470 -> Bitmap Index Scan on t1_i1
2471 Index Cond: (c1 < $1)
2474 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2476 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2485 ----------------------------------
2486 Bitmap Heap Scan on t1
2487 Recheck Cond: (c1 < $1)
2488 -> Bitmap Index Scan on t1_i1
2489 Index Cond: (c1 < $1)
2496 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2504 EXPLAIN (COSTS false) EXECUTE p1;
2506 --------------------
2511 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2512 EXPLAIN (COSTS false) EXECUTE p1;
2521 --------------------
2528 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2536 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2538 ----------------------------------
2539 Bitmap Heap Scan on t1
2540 Recheck Cond: (c1 < $1)
2541 -> Bitmap Index Scan on t1_i1
2542 Index Cond: (c1 < $1)
2545 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2547 ----------------------------------
2548 Bitmap Heap Scan on t1
2549 Recheck Cond: (c1 < $1)
2550 -> Bitmap Index Scan on t1_i1
2551 Index Cond: (c1 < $1)
2554 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2556 ----------------------------------
2557 Bitmap Heap Scan on t1
2558 Recheck Cond: (c1 < $1)
2559 -> Bitmap Index Scan on t1_i1
2560 Index Cond: (c1 < $1)
2563 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2565 ----------------------------------
2566 Bitmap Heap Scan on t1
2567 Recheck Cond: (c1 < $1)
2568 -> Bitmap Index Scan on t1_i1
2569 Index Cond: (c1 < $1)
2572 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2574 ----------------------------------
2575 Bitmap Heap Scan on t1
2576 Recheck Cond: (c1 < $1)
2577 -> Bitmap Index Scan on t1_i1
2578 Index Cond: (c1 < $1)
2581 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2583 ----------------------------------
2584 Bitmap Heap Scan on t1
2585 Recheck Cond: (c1 < $1)
2586 -> Bitmap Index Scan on t1_i1
2587 Index Cond: (c1 < $1)
2590 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2591 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2600 ----------------------------------
2601 Bitmap Heap Scan on t1
2602 Recheck Cond: (c1 < $1)
2603 -> Bitmap Index Scan on t1_i1
2604 Index Cond: (c1 < $1)
2610 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2612 EXPLAIN (COSTS false) EXECUTE p1;
2614 ------------------------------
2615 Index Scan using t1_i1 on t1
2616 Index Cond: (c1 = 1)
2619 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2621 EXPLAIN (COSTS false) EXECUTE p1;
2623 ------------------------------
2624 Index Scan using t1_i1 on t1
2625 Index Cond: (c1 = 1)
2629 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2631 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2633 ---------------------
2638 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2640 ---------------------
2645 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2647 ---------------------
2652 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2654 ---------------------
2659 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2661 ---------------------
2666 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2668 ---------------------
2673 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2675 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2677 ---------------------
2686 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2695 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2697 --------------------
2702 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2704 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2713 --------------------
2720 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2729 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2731 ----------------------------------
2732 Bitmap Heap Scan on t1
2733 Recheck Cond: (c1 < $1)
2734 -> Bitmap Index Scan on t1_i1
2735 Index Cond: (c1 < $1)
2739 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2741 ----------------------------------
2742 Bitmap Heap Scan on t1
2743 Recheck Cond: (c1 < $1)
2744 -> Bitmap Index Scan on t1_i1
2745 Index Cond: (c1 < $1)
2749 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2751 ----------------------------------
2752 Bitmap Heap Scan on t1
2753 Recheck Cond: (c1 < $1)
2754 -> Bitmap Index Scan on t1_i1
2755 Index Cond: (c1 < $1)
2759 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2761 ----------------------------------
2762 Bitmap Heap Scan on t1
2763 Recheck Cond: (c1 < $1)
2764 -> Bitmap Index Scan on t1_i1
2765 Index Cond: (c1 < $1)
2769 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2771 ----------------------------------
2772 Bitmap Heap Scan on t1
2773 Recheck Cond: (c1 < $1)
2774 -> Bitmap Index Scan on t1_i1
2775 Index Cond: (c1 < $1)
2779 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2781 ----------------------------------
2782 Bitmap Heap Scan on t1
2783 Recheck Cond: (c1 < $1)
2784 -> Bitmap Index Scan on t1_i1
2785 Index Cond: (c1 < $1)
2788 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2790 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2799 ----------------------------------
2800 Bitmap Heap Scan on t1
2801 Recheck Cond: (c1 < $1)
2802 -> Bitmap Index Scan on t1_i1
2803 Index Cond: (c1 < $1)
2810 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2818 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2820 --------------------
2825 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2826 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2835 --------------------
2842 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2850 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2852 ----------------------------------
2853 Bitmap Heap Scan on t1
2854 Recheck Cond: (c1 < $1)
2855 -> Bitmap Index Scan on t1_i1
2856 Index Cond: (c1 < $1)
2859 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2861 ----------------------------------
2862 Bitmap Heap Scan on t1
2863 Recheck Cond: (c1 < $1)
2864 -> Bitmap Index Scan on t1_i1
2865 Index Cond: (c1 < $1)
2868 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2870 ----------------------------------
2871 Bitmap Heap Scan on t1
2872 Recheck Cond: (c1 < $1)
2873 -> Bitmap Index Scan on t1_i1
2874 Index Cond: (c1 < $1)
2877 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2879 ----------------------------------
2880 Bitmap Heap Scan on t1
2881 Recheck Cond: (c1 < $1)
2882 -> Bitmap Index Scan on t1_i1
2883 Index Cond: (c1 < $1)
2886 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2888 ----------------------------------
2889 Bitmap Heap Scan on t1
2890 Recheck Cond: (c1 < $1)
2891 -> Bitmap Index Scan on t1_i1
2892 Index Cond: (c1 < $1)
2895 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2897 ----------------------------------
2898 Bitmap Heap Scan on t1
2899 Recheck Cond: (c1 < $1)
2900 -> Bitmap Index Scan on t1_i1
2901 Index Cond: (c1 < $1)
2904 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2905 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2914 ----------------------------------
2915 Bitmap Heap Scan on t1
2916 Recheck Cond: (c1 < $1)
2917 -> Bitmap Index Scan on t1_i1
2918 Index Cond: (c1 < $1)
2924 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2926 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2928 ------------------------------
2929 Index Scan using t1_i1 on t1
2930 Index Cond: (c1 = 1)
2933 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2935 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2937 ------------------------------
2938 Index Scan using t1_i1 on t1
2939 Index Cond: (c1 = 1)
2943 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2945 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2947 ---------------------
2953 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2955 ---------------------
2961 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2963 ---------------------
2969 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2971 ---------------------
2977 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2979 ---------------------
2985 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2987 ---------------------
2992 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2994 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2996 ---------------------
3003 ---- No. A-10-4 EXECUTE statement name error
3007 ERROR: prepared statement "p1" does not exist
3008 SHOW pg_hint_plan.debug_print;
3009 pg_hint_plan.debug_print
3010 --------------------------
3015 ---- No. A-11-5 EXECUTE statement name error
3018 SELECT pg_stat_statements_reset();
3019 pg_stat_statements_reset
3020 --------------------------
3024 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3030 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3033 Set(enable_seqscan off)
3043 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3056 SELECT s.query, s.calls
3057 FROM public.pg_stat_statements s
3058 JOIN pg_catalog.pg_database d
3062 -------------------------------------------------------------------+-------
3063 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3064 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3065 SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3066 SELECT pg_stat_statements_reset(); | 1
3069 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
3071 -----------------------------------------------------
3073 Join Filter: (t1.c1 = t4.c1)
3075 Join Filter: (t1.c1 = t3.c1)
3077 Join Filter: (t1.c1 = t2.c1)
3079 TID Cond: (ctid = '(1,1)'::tid)
3081 Filter: (ctid = '(1,1)'::tid)
3083 TID Cond: (ctid = '(1,1)'::tid)
3085 TID Cond: (ctid = '(1,1)'::tid)
3089 Set(enable_tidscan aaa)
3090 Set(enable_tidscan on)
3091 Set(enable_tidscan off)
3099 Leading(t2 t1 t4 t3)
3100 Leading(t1 t4 t3 t2)
3101 Leading(t4 t3 t2 t1)
3103 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
3104 INFO: hint syntax error at or near "SeqScan(t4)
3111 Leading(t2 t1 t4 t3)
3112 Leading(t1 t4 t3 t2)
3113 Leading(t4 t3 t2 t1)
3115 DETAIL: Conflict scan method hint.
3116 INFO: hint syntax error at or near "IndexScan(t4)
3122 Leading(t2 t1 t4 t3)
3123 Leading(t1 t4 t3 t2)
3124 Leading(t4 t3 t2 t1)
3126 DETAIL: Conflict scan method hint.
3127 INFO: hint syntax error at or near "BitmapScan(t4)
3132 Leading(t2 t1 t4 t3)
3133 Leading(t1 t4 t3 t2)
3134 Leading(t4 t3 t2 t1)
3136 DETAIL: Conflict scan method hint.
3137 INFO: hint syntax error at or near "NestLoop(t4 t3)
3140 Leading(t2 t1 t4 t3)
3141 Leading(t1 t4 t3 t2)
3142 Leading(t4 t3 t2 t1)
3144 DETAIL: Conflict join method hint.
3145 INFO: hint syntax error at or near "MergeJoin(t4 t3)
3147 Leading(t2 t1 t4 t3)
3148 Leading(t1 t4 t3 t2)
3149 Leading(t4 t3 t2 t1)
3151 DETAIL: Conflict join method hint.
3152 INFO: hint syntax error at or near "Leading(t2 t1 t4 t3)
3153 Leading(t1 t4 t3 t2)
3154 Leading(t4 t3 t2 t1)
3156 DETAIL: Conflict leading hint.
3157 INFO: hint syntax error at or near "Leading(t1 t4 t3 t2)
3158 Leading(t4 t3 t2 t1)
3160 DETAIL: Conflict leading hint.
3161 INFO: hint syntax error at or near "Set(enable_tidscan aaa)
3162 Set(enable_tidscan on)
3163 Set(enable_tidscan off)
3171 Leading(t2 t1 t4 t3)
3172 Leading(t1 t4 t3 t2)
3173 Leading(t4 t3 t2 t1)
3175 DETAIL: Conflict set hint.
3176 INFO: hint syntax error at or near "Set(enable_tidscan on)
3177 Set(enable_tidscan off)
3185 Leading(t2 t1 t4 t3)
3186 Leading(t1 t4 t3 t2)
3187 Leading(t4 t3 t2 t1)
3189 DETAIL: Conflict set hint.
3194 Leading(t4 t3 t2 t1)
3195 Set(enable_tidscan off)
3203 Leading(t2 t1 t4 t3)
3204 Leading(t1 t4 t3 t2)
3205 Set(enable_tidscan aaa)
3206 Set(enable_tidscan on)
3210 -----------------------------------------------------------
3213 Join Filter: (t3.c1 = t2.c1)
3215 Hash Cond: (t3.c1 = t4.c1)
3217 Filter: (ctid = '(1,1)'::tid)
3220 TID Cond: (ctid = '(1,1)'::tid)
3222 Filter: (ctid = '(1,1)'::tid)
3223 -> Index Scan using t1_i1 on t1
3224 Index Cond: (c1 = t2.c1)
3225 Filter: (ctid = '(1,1)'::tid)
3228 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
3230 -----------------------------------------------------
3232 Join Filter: (t1.c1 = t4.c1)
3234 Join Filter: (t1.c1 = t3.c1)
3236 Join Filter: (t1.c1 = t2.c1)
3238 TID Cond: (ctid = '(1,1)'::tid)
3240 Filter: (ctid = '(1,1)'::tid)
3242 TID Cond: (ctid = '(1,1)'::tid)
3244 TID Cond: (ctid = '(1,1)'::tid)
3249 Set(enable_tidscan aaa)
3252 Leading(t2 t1 t4 t3)
3253 Set(enable_tidscan on)
3256 Leading(t1 t4 t3 t2)
3257 Set(enable_tidscan off)
3260 Leading(t4 t3 t2 t1)
3262 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
3263 INFO: hint syntax error at or near "SeqScan(t4)
3264 Set(enable_tidscan aaa)
3267 Leading(t2 t1 t4 t3)
3268 Set(enable_tidscan on)
3271 Leading(t1 t4 t3 t2)
3272 Set(enable_tidscan off)
3275 Leading(t4 t3 t2 t1)
3277 DETAIL: Conflict scan method hint.
3278 INFO: hint syntax error at or near "IndexScan(t4)
3280 Leading(t2 t1 t4 t3)
3281 Set(enable_tidscan on)
3284 Leading(t1 t4 t3 t2)
3285 Set(enable_tidscan off)
3288 Leading(t4 t3 t2 t1)
3290 DETAIL: Conflict scan method hint.
3291 INFO: hint syntax error at or near "BitmapScan(t4)
3293 Leading(t1 t4 t3 t2)
3294 Set(enable_tidscan off)
3297 Leading(t4 t3 t2 t1)
3299 DETAIL: Conflict scan method hint.
3300 INFO: hint syntax error at or near "NestLoop(t4 t3)
3301 Leading(t2 t1 t4 t3)
3302 Set(enable_tidscan on)
3305 Leading(t1 t4 t3 t2)
3306 Set(enable_tidscan off)
3309 Leading(t4 t3 t2 t1)
3311 DETAIL: Conflict join method hint.
3312 INFO: hint syntax error at or near "MergeJoin(t4 t3)
3313 Leading(t1 t4 t3 t2)
3314 Set(enable_tidscan off)
3317 Leading(t4 t3 t2 t1)
3319 DETAIL: Conflict join method hint.
3320 INFO: hint syntax error at or near "Leading(t2 t1 t4 t3)
3321 Set(enable_tidscan on)
3324 Leading(t1 t4 t3 t2)
3325 Set(enable_tidscan off)
3328 Leading(t4 t3 t2 t1)
3330 DETAIL: Conflict leading hint.
3331 INFO: hint syntax error at or near "Leading(t1 t4 t3 t2)
3332 Set(enable_tidscan off)
3335 Leading(t4 t3 t2 t1)
3337 DETAIL: Conflict leading hint.
3338 INFO: hint syntax error at or near "Set(enable_tidscan aaa)
3341 Leading(t2 t1 t4 t3)
3342 Set(enable_tidscan on)
3345 Leading(t1 t4 t3 t2)
3346 Set(enable_tidscan off)
3349 Leading(t4 t3 t2 t1)
3351 DETAIL: Conflict set hint.
3352 INFO: hint syntax error at or near "Set(enable_tidscan on)
3355 Leading(t1 t4 t3 t2)
3356 Set(enable_tidscan off)
3359 Leading(t4 t3 t2 t1)
3361 DETAIL: Conflict set hint.
3366 Leading(t4 t3 t2 t1)
3367 Set(enable_tidscan off)
3375 Leading(t2 t1 t4 t3)
3376 Leading(t1 t4 t3 t2)
3377 Set(enable_tidscan aaa)
3378 Set(enable_tidscan on)
3382 -----------------------------------------------------------
3385 Join Filter: (t3.c1 = t2.c1)
3387 Hash Cond: (t3.c1 = t4.c1)
3389 Filter: (ctid = '(1,1)'::tid)
3392 TID Cond: (ctid = '(1,1)'::tid)
3394 Filter: (ctid = '(1,1)'::tid)
3395 -> Index Scan using t1_i1 on t1
3396 Index Cond: (c1 = t2.c1)
3397 Filter: (ctid = '(1,1)'::tid)
3400 EXPLAIN (COSTS false) SELECT * FROM s1.t1 FULL OUTER JOIN s1.t2 ON (t1.c1 = t2.c1);
3402 ------------------------------
3404 Hash Cond: (t1.c1 = t2.c1)
3410 /*+NestLoop(t1 t2)*/
3411 EXPLAIN (COSTS true) SELECT * FROM s1.t1 FULL OUTER JOIN s1.t2 ON (t1.c1 = t2.c1);
3420 --------------------------------------------------------------------------
3421 Hash Full Join (cost=10000000003.25..10000000024.00 rows=1000 width=29)
3422 Hash Cond: (t1.c1 = t2.c1)
3423 -> Seq Scan on t1 (cost=0.00..16.00 rows=1000 width=15)
3424 -> Hash (cost=2.00..2.00 rows=100 width=14)
3425 -> Seq Scan on t2 (cost=0.00..2.00 rows=100 width=14)
3428 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c3 = 1;
3430 ---------------------------------
3431 Bitmap Heap Scan on t1
3432 Recheck Cond: (c3 = 1)
3433 -> Bitmap Index Scan on t1_i
3434 Index Cond: (c3 = 1)
3437 /*+IndexScan(t1 t1_i1)*/
3438 EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c3 = 1;
3439 LOG: available indexes for IndexScan(t1): t1_i1
3448 ------------------------------------------------------------------------
3449 Seq Scan on t1 (cost=10000000000.00..10000000018.50 rows=10 width=15)
3453 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3455 ------------------------------
3456 Index Scan using t1_i1 on t1
3457 Index Cond: (c1 = 1)
3461 EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3470 -----------------------------------------------------------------------
3471 Seq Scan on t1 (cost=10000000000.00..10000000018.50 rows=1 width=15)
3475 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
3477 ----------------------------------
3479 Hash Cond: (v1t1.c1 = v1t1.c1)
3480 -> Seq Scan on t1 v1t1
3482 -> Seq Scan on t1 v1t1
3485 /*+Leading(v1t1 v1t1)HashJoin(v1t1 v1t1)BitmapScan(v1t1)*/
3486 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
3487 INFO: hint syntax error at or near "HashJoin(v1t1 v1t1)BitmapScan(v1t1)"
3488 DETAIL: Relation name "v1t1" is ambiguous.
3489 INFO: hint syntax error at or near "Leading(v1t1 v1t1)HashJoin(v1t1 v1t1)BitmapScan(v1t1)"
3490 DETAIL: Relation name "v1t1" is ambiguous.
3501 ------------------------------------------
3503 -> Index Scan using t1_i1 on t1 v1t1
3504 -> Bitmap Heap Scan on t1 v1t1
3505 Recheck Cond: (c1 = v1t1.c1)
3506 -> Bitmap Index Scan on t1_i1
3507 Index Cond: (c1 = v1t1.c1)
3510 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
3512 -----------------------------------
3514 Hash Cond: (v1t1.c1 = v1t1_.c1)
3515 -> Seq Scan on t1 v1t1
3517 -> Seq Scan on t1 v1t1_
3520 /*+Leading(v1t1 v1t1_)NestLoop(v1t1 v1t1_)SeqScan(v1t1)BitmapScan(v1t1_)*/
3521 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
3526 NestLoop(v1t1 v1t1_)
3533 ------------------------------------------
3535 -> Seq Scan on t1 v1t1
3536 -> Bitmap Heap Scan on t1 v1t1_
3537 Recheck Cond: (c1 = v1t1.c1)
3538 -> Bitmap Index Scan on t1_i1
3539 Index Cond: (c1 = v1t1.c1)
3542 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
3544 ----------------------------------
3546 Hash Cond: (r4t1.c1 = r4t1.c1)
3547 -> Seq Scan on t1 r4t1
3549 -> Seq Scan on t1 r4t1
3552 /*+Leading(r4t1 r4t1)HashJoin(r4t1 r4t1)BitmapScan(r4t1)*/
3553 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
3554 INFO: hint syntax error at or near "HashJoin(r4t1 r4t1)BitmapScan(r4t1)"
3555 DETAIL: Relation name "r4t1" is ambiguous.
3556 INFO: hint syntax error at or near "Leading(r4t1 r4t1)HashJoin(r4t1 r4t1)BitmapScan(r4t1)"
3557 DETAIL: Relation name "r4t1" is ambiguous.
3568 ------------------------------------------
3570 -> Index Scan using t1_i1 on t1 r4t1
3571 -> Bitmap Heap Scan on t1 r4t1
3572 Recheck Cond: (c1 = r4t1.c1)
3573 -> Bitmap Index Scan on t1_i1
3574 Index Cond: (c1 = r4t1.c1)
3577 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
3579 ----------------------------------
3581 Hash Cond: (r4t1.c1 = r5t1.c1)
3582 -> Seq Scan on t1 r4t1
3584 -> Seq Scan on t1 r5t1
3587 /*+Leading(r4t1 r5t1)NestLoop(r4t1 r5t1)SeqScan(r4t1)BitmapScan(r5t1)*/
3588 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
3600 ------------------------------------------
3602 -> Seq Scan on t1 r4t1
3603 -> Bitmap Heap Scan on t1 r5t1
3604 Recheck Cond: (c1 = r4t1.c1)
3605 -> Bitmap Index Scan on t1_i1
3606 Index Cond: (c1 = r4t1.c1)
3609 SELECT count(*) FROM s1.t1 WHERE t1.c1 = 1;
3616 SELECT count(*) FROM s1.t1 WHERE t1.c1 = 1;
3631 SELECT count(*) FROM s1.t1 WHERE t1.c1 = 1;
3646 SELECT count(*) FROM s1.t1 WHERE t1.c1 = 1;
3653 CREATE OR REPLACE FUNCTION f1() RETURNS SETOF text LANGUAGE plpgsql AS $$
3657 FOR r IN EXPLAIN SELECT c4 FROM s1.t1 WHERE t1.c1 = 1
3659 RETURN NEXT r; -- return current row of SELECT
3666 ----------------------------------------------------------------
3667 Index Scan using t1_i1 on t1 (cost=0.00..8.27 rows=1 width=3)
3668 Index Cond: (c1 = 1)
3687 CONTEXT: PL/pgSQL function "f1" line 5 at FOR over SELECT rows
3689 ---------------------------------------------------
3690 Seq Scan on t1 (cost=0.00..18.50 rows=1 width=3)
3694 /*+SeqScan(t1)*/CREATE OR REPLACE FUNCTION f1() RETURNS SETOF text LANGUAGE plpgsql AS $$
3698 /*+SeqScan(t1)*/FOR r IN EXPLAIN /*+SeqScan(t1)*/SELECT c4 FROM s1.t1 WHERE t1.c1 = 1
3700 /*+SeqScan(t1)*/RETURN NEXT r; -- return current row of SELECT
3702 /*+SeqScan(t1)*/RETURN;
3707 ----------------------------------------------------------------
3708 Index Scan using t1_i1 on t1 (cost=0.00..8.27 rows=1 width=3)
3709 Index Cond: (c1 = 1)
3713 ---- No. A-12-1 reset of global variable of core at the error
3714 ---- No. A-12-2 reset of global variable of original at the error
3716 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3718 ------------------------------------
3720 Merge Cond: (t1.c1 = t2.c1)
3721 -> Index Scan using t1_i1 on t1
3727 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3728 PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3729 INFO: hint syntax error at or near "NestLoop(t1 t1)"
3730 DETAIL: Relation name "t1" is duplicated.
3735 Set(enable_seqscan off)
3736 Set(geqo_threshold 100)
3742 EXPLAIN (COSTS false) EXECUTE p1;
3744 ------------------------------------
3746 Merge Cond: (t1.c1 = t2.c1)
3750 -> Index Scan using t2_i1 on t2
3755 SELECT name, setting FROM settings;
3757 ---------------------------+-----------
3760 geqo_generations | 0
3763 geqo_selection_bias | 2
3765 constraint_exclusion | partition
3766 cursor_tuple_fraction | 0.1
3767 default_statistics_target | 100
3768 from_collapse_limit | 8
3769 join_collapse_limit | 8
3770 cpu_index_tuple_cost | 0.005
3771 cpu_operator_cost | 0.0025
3772 cpu_tuple_cost | 0.01
3773 effective_cache_size | 16384
3774 random_page_cost | 4
3776 enable_bitmapscan | on
3778 enable_hashjoin | on
3779 enable_indexscan | on
3780 enable_material | on
3781 enable_mergejoin | on
3782 enable_nestloop | on
3786 client_min_messages | log
3789 SET pg_hint_plan.parse_messages TO error;
3790 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3791 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3792 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3793 DETAIL: Relation name "t1" is duplicated.
3794 SELECT name, setting FROM settings;
3796 ---------------------------+-----------
3799 geqo_generations | 0
3802 geqo_selection_bias | 2
3804 constraint_exclusion | partition
3805 cursor_tuple_fraction | 0.1
3806 default_statistics_target | 100
3807 from_collapse_limit | 8
3808 join_collapse_limit | 8
3809 cpu_index_tuple_cost | 0.005
3810 cpu_operator_cost | 0.0025
3811 cpu_tuple_cost | 0.01
3812 effective_cache_size | 16384
3813 random_page_cost | 4
3815 enable_bitmapscan | on
3817 enable_hashjoin | on
3818 enable_indexscan | on
3819 enable_material | on
3820 enable_mergejoin | on
3821 enable_nestloop | on
3825 client_min_messages | log
3828 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3829 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3834 Set(enable_seqscan off)
3835 Set(geqo_threshold 100)
3841 ------------------------------------
3843 Merge Cond: (t1.c1 = t2.c1)
3847 -> Index Scan using t2_i1 on t2
3852 SELECT name, setting FROM settings;
3854 ---------------------------+-----------
3857 geqo_generations | 0
3860 geqo_selection_bias | 2
3862 constraint_exclusion | partition
3863 cursor_tuple_fraction | 0.1
3864 default_statistics_target | 100
3865 from_collapse_limit | 8
3866 join_collapse_limit | 8
3867 cpu_index_tuple_cost | 0.005
3868 cpu_operator_cost | 0.0025
3869 cpu_tuple_cost | 0.01
3870 effective_cache_size | 16384
3871 random_page_cost | 4
3873 enable_bitmapscan | on
3875 enable_hashjoin | on
3876 enable_indexscan | on
3877 enable_material | on
3878 enable_mergejoin | on
3879 enable_nestloop | on
3883 client_min_messages | log
3886 SET pg_hint_plan.parse_messages TO error;
3887 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3888 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3889 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3890 DETAIL: Relation name "t1" is duplicated.
3891 SELECT name, setting FROM settings;
3893 ---------------------------+-----------
3896 geqo_generations | 0
3899 geqo_selection_bias | 2
3901 constraint_exclusion | partition
3902 cursor_tuple_fraction | 0.1
3903 default_statistics_target | 100
3904 from_collapse_limit | 8
3905 join_collapse_limit | 8
3906 cpu_index_tuple_cost | 0.005
3907 cpu_operator_cost | 0.0025
3908 cpu_tuple_cost | 0.01
3909 effective_cache_size | 16384
3910 random_page_cost | 4
3912 enable_bitmapscan | on
3914 enable_hashjoin | on
3915 enable_indexscan | on
3916 enable_material | on
3917 enable_mergejoin | on
3918 enable_nestloop | on
3922 client_min_messages | log
3925 EXPLAIN (COSTS false) EXECUTE p1;
3927 ------------------------------------
3929 Merge Cond: (t1.c1 = t2.c1)
3933 -> Index Scan using t2_i1 on t2
3938 SELECT name, setting FROM settings;
3940 ---------------------------+-----------
3943 geqo_generations | 0
3946 geqo_selection_bias | 2
3948 constraint_exclusion | partition
3949 cursor_tuple_fraction | 0.1
3950 default_statistics_target | 100
3951 from_collapse_limit | 8
3952 join_collapse_limit | 8
3953 cpu_index_tuple_cost | 0.005
3954 cpu_operator_cost | 0.0025
3955 cpu_tuple_cost | 0.01
3956 effective_cache_size | 16384
3957 random_page_cost | 4
3959 enable_bitmapscan | on
3961 enable_hashjoin | on
3962 enable_indexscan | on
3963 enable_material | on
3964 enable_mergejoin | on
3965 enable_nestloop | on
3969 client_min_messages | log
3972 SET pg_hint_plan.parse_messages TO error;
3973 EXPLAIN (COSTS false) EXECUTE p2;
3974 ERROR: prepared statement "p2" does not exist
3975 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3976 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3981 Set(enable_seqscan off)
3982 Set(geqo_threshold 100)
3988 ------------------------------------
3990 Merge Cond: (t1.c1 = t2.c1)
3994 -> Index Scan using t2_i1 on t2
3997 EXPLAIN (COSTS false) EXECUTE p1;
3999 ------------------------------------
4001 Merge Cond: (t1.c1 = t2.c1)
4005 -> Index Scan using t2_i1 on t2
4008 SELECT name, setting FROM settings;
4010 ---------------------------+-----------
4013 geqo_generations | 0
4016 geqo_selection_bias | 2
4018 constraint_exclusion | partition
4019 cursor_tuple_fraction | 0.1
4020 default_statistics_target | 100
4021 from_collapse_limit | 8
4022 join_collapse_limit | 8
4023 cpu_index_tuple_cost | 0.005
4024 cpu_operator_cost | 0.0025
4025 cpu_tuple_cost | 0.01
4026 effective_cache_size | 16384
4027 random_page_cost | 4
4029 enable_bitmapscan | on
4031 enable_hashjoin | on
4032 enable_indexscan | on
4033 enable_material | on
4034 enable_mergejoin | on
4035 enable_nestloop | on
4039 client_min_messages | log
4044 SELECT name, setting FROM settings;
4046 ---------------------------+-----------
4049 geqo_generations | 0
4052 geqo_selection_bias | 2
4054 constraint_exclusion | partition
4055 cursor_tuple_fraction | 0.1
4056 default_statistics_target | 100
4057 from_collapse_limit | 8
4058 join_collapse_limit | 8
4059 cpu_index_tuple_cost | 0.005
4060 cpu_operator_cost | 0.0025
4061 cpu_tuple_cost | 0.01
4062 effective_cache_size | 16384
4063 random_page_cost | 4
4065 enable_bitmapscan | on
4067 enable_hashjoin | on
4068 enable_indexscan | on
4069 enable_material | on
4070 enable_mergejoin | on
4071 enable_nestloop | on
4075 client_min_messages | log
4078 SET pg_hint_plan.parse_messages TO error;
4079 EXPLAIN (COSTS false) EXECUTE p2;
4080 ERROR: prepared statement "p2" does not exist
4081 EXPLAIN (COSTS false) EXECUTE p1;
4083 ------------------------------------
4085 Merge Cond: (t1.c1 = t2.c1)
4089 -> Index Scan using t2_i1 on t2
4092 SELECT name, setting FROM settings;
4094 ---------------------------+-----------
4097 geqo_generations | 0
4100 geqo_selection_bias | 2
4102 constraint_exclusion | partition
4103 cursor_tuple_fraction | 0.1
4104 default_statistics_target | 100
4105 from_collapse_limit | 8
4106 join_collapse_limit | 8
4107 cpu_index_tuple_cost | 0.005
4108 cpu_operator_cost | 0.0025
4109 cpu_tuple_cost | 0.01
4110 effective_cache_size | 16384
4111 random_page_cost | 4
4113 enable_bitmapscan | on
4115 enable_hashjoin | on
4116 enable_indexscan | on
4117 enable_material | on
4118 enable_mergejoin | on
4119 enable_nestloop | on
4123 client_min_messages | log
4127 SET pg_hint_plan.parse_messages TO LOG;
4129 ---- No. A-12-3 effective range of the hint
4131 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4133 ------------------------------------
4135 Merge Cond: (t1.c1 = t2.c1)
4136 -> Index Scan using t1_i1 on t1
4143 SET enable_indexscan TO off;
4144 SET enable_mergejoin TO off;
4145 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4147 ------------------------------
4149 Hash Cond: (t1.c1 = t2.c1)
4155 SELECT name, setting FROM settings;
4157 ---------------------------+-----------
4160 geqo_generations | 0
4163 geqo_selection_bias | 2
4165 constraint_exclusion | partition
4166 cursor_tuple_fraction | 0.1
4167 default_statistics_target | 100
4168 from_collapse_limit | 8
4169 join_collapse_limit | 8
4170 cpu_index_tuple_cost | 0.005
4171 cpu_operator_cost | 0.0025
4172 cpu_tuple_cost | 0.01
4173 effective_cache_size | 16384
4174 random_page_cost | 4
4176 enable_bitmapscan | on
4178 enable_hashjoin | on
4179 enable_indexscan | off
4180 enable_material | on
4181 enable_mergejoin | off
4182 enable_nestloop | on
4186 client_min_messages | log
4189 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
4190 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4196 Set(enable_indexscan on)
4197 Set(geqo_threshold 100)
4203 ------------------------------------
4205 Merge Cond: (t1.c1 = t2.c1)
4206 -> Index Scan using t1_i1 on t1
4207 -> Index Scan using t2_i1 on t2
4210 SELECT name, setting FROM settings;
4212 ---------------------------+-----------
4215 geqo_generations | 0
4218 geqo_selection_bias | 2
4220 constraint_exclusion | partition
4221 cursor_tuple_fraction | 0.1
4222 default_statistics_target | 100
4223 from_collapse_limit | 8
4224 join_collapse_limit | 8
4225 cpu_index_tuple_cost | 0.005
4226 cpu_operator_cost | 0.0025
4227 cpu_tuple_cost | 0.01
4228 effective_cache_size | 16384
4229 random_page_cost | 4
4231 enable_bitmapscan | on
4233 enable_hashjoin | on
4234 enable_indexscan | off
4235 enable_material | on
4236 enable_mergejoin | off
4237 enable_nestloop | on
4241 client_min_messages | log
4244 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4246 ------------------------------
4248 Hash Cond: (t1.c1 = t2.c1)
4255 SET enable_indexscan TO off;
4256 SET enable_mergejoin TO off;
4257 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4259 ------------------------------
4261 Hash Cond: (t1.c1 = t2.c1)
4267 SELECT name, setting FROM settings;
4269 ---------------------------+-----------
4272 geqo_generations | 0
4275 geqo_selection_bias | 2
4277 constraint_exclusion | partition
4278 cursor_tuple_fraction | 0.1
4279 default_statistics_target | 100
4280 from_collapse_limit | 8
4281 join_collapse_limit | 8
4282 cpu_index_tuple_cost | 0.005
4283 cpu_operator_cost | 0.0025
4284 cpu_tuple_cost | 0.01
4285 effective_cache_size | 16384
4286 random_page_cost | 4
4288 enable_bitmapscan | on
4290 enable_hashjoin | on
4291 enable_indexscan | off
4292 enable_material | on
4293 enable_mergejoin | off
4294 enable_nestloop | on
4298 client_min_messages | log
4302 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
4303 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4309 Set(enable_indexscan on)
4310 Set(geqo_threshold 100)
4316 ------------------------------------
4318 Merge Cond: (t1.c1 = t2.c1)
4319 -> Index Scan using t1_i1 on t1
4320 -> Index Scan using t2_i1 on t2
4325 SELECT name, setting FROM settings;
4327 ---------------------------+-----------
4330 geqo_generations | 0
4333 geqo_selection_bias | 2
4335 constraint_exclusion | partition
4336 cursor_tuple_fraction | 0.1
4337 default_statistics_target | 100
4338 from_collapse_limit | 8
4339 join_collapse_limit | 8
4340 cpu_index_tuple_cost | 0.005
4341 cpu_operator_cost | 0.0025
4342 cpu_tuple_cost | 0.01
4343 effective_cache_size | 16384
4344 random_page_cost | 4
4346 enable_bitmapscan | on
4348 enable_hashjoin | on
4349 enable_indexscan | off
4350 enable_material | on
4351 enable_mergejoin | off
4352 enable_nestloop | on
4356 client_min_messages | log
4359 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4361 ------------------------------
4363 Hash Cond: (t1.c1 = t2.c1)
4371 SET enable_indexscan TO off;
4372 SET enable_mergejoin TO off;
4373 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4375 ------------------------------
4377 Hash Cond: (t1.c1 = t2.c1)
4383 SELECT name, setting FROM settings;
4385 ---------------------------+-----------
4388 geqo_generations | 0
4391 geqo_selection_bias | 2
4393 constraint_exclusion | partition
4394 cursor_tuple_fraction | 0.1
4395 default_statistics_target | 100
4396 from_collapse_limit | 8
4397 join_collapse_limit | 8
4398 cpu_index_tuple_cost | 0.005
4399 cpu_operator_cost | 0.0025
4400 cpu_tuple_cost | 0.01
4401 effective_cache_size | 16384
4402 random_page_cost | 4
4404 enable_bitmapscan | on
4406 enable_hashjoin | on
4407 enable_indexscan | off
4408 enable_material | on
4409 enable_mergejoin | off
4410 enable_nestloop | on
4414 client_min_messages | log
4417 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
4418 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4424 Set(enable_indexscan on)
4425 Set(geqo_threshold 100)
4431 ------------------------------------
4433 Merge Cond: (t1.c1 = t2.c1)
4434 -> Index Scan using t1_i1 on t1
4435 -> Index Scan using t2_i1 on t2
4439 SET enable_indexscan TO off;
4440 SET enable_mergejoin TO off;
4441 LOAD 'pg_hint_plan';
4442 SELECT name, setting FROM settings;
4444 ---------------------------+-----------
4447 geqo_generations | 0
4450 geqo_selection_bias | 2
4452 constraint_exclusion | partition
4453 cursor_tuple_fraction | 0.1
4454 default_statistics_target | 100
4455 from_collapse_limit | 8
4456 join_collapse_limit | 8
4457 cpu_index_tuple_cost | 0.005
4458 cpu_operator_cost | 0.0025
4459 cpu_tuple_cost | 0.01
4460 effective_cache_size | 16384
4461 random_page_cost | 4
4463 enable_bitmapscan | on
4465 enable_hashjoin | on
4466 enable_indexscan | off
4467 enable_material | on
4468 enable_mergejoin | off
4469 enable_nestloop | on
4473 client_min_messages | notice
4476 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4478 ------------------------------
4480 Hash Cond: (t1.c1 = t2.c1)
4486 SET pg_hint_plan.enable_hint TO on;
4487 SET pg_hint_plan.debug_print TO on;
4488 SET client_min_messages TO LOG;
4489 SET search_path TO public;
4490 RESET enable_indexscan;
4491 RESET enable_mergejoin;
4493 ---- No. A-13 call planner recursively
4495 CREATE OR REPLACE FUNCTION nested_planner(cnt int) RETURNS int AS $$
4499 RAISE NOTICE 'nested_planner(%)', cnt;
4506 EXECUTE '/*+ IndexScan(t_1) */'
4507 ' SELECT nested_planner($1) FROM s1.t1 t_1'
4508 ' JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)'
4509 ' ORDER BY t_1.c1 LIMIT 1'
4510 INTO new_cnt USING cnt - 1;
4514 $$ LANGUAGE plpgsql IMMUTABLE;
4516 ---- No. A-13-2 use hint of main query
4519 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4520 NOTICE: nested_planner(1)
4522 ----------------------------------
4523 Index Scan using t1_i1 on t1 t_1
4527 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4528 NOTICE: nested_planner(1)
4537 --------------------------
4540 -> Seq Scan on t1 t_1
4544 ---- No. A-13-3 output number of times of debugging log
4547 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4548 NOTICE: nested_planner(1)
4550 ----------------------------------
4551 Index Scan using t1_i1 on t1 t_1
4555 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4556 NOTICE: nested_planner(1)
4565 ----------------------------------
4566 Index Scan using t1_i1 on t1 t_1
4570 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
4571 NOTICE: nested_planner(2)
4572 NOTICE: nested_planner(1)
4573 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4574 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4576 ----------------------------------
4577 Index Scan using t1_i1 on t1 t_1
4581 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
4582 NOTICE: nested_planner(2)
4583 NOTICE: nested_planner(1)
4584 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4585 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4593 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4594 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4603 ----------------------------------
4604 Index Scan using t1_i1 on t1 t_1
4608 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
4609 NOTICE: nested_planner(5)
4610 NOTICE: nested_planner(4)
4611 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4612 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4613 NOTICE: nested_planner(3)
4614 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4615 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4616 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4617 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4618 NOTICE: nested_planner(2)
4619 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4620 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4621 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4622 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4623 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4624 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4625 NOTICE: nested_planner(1)
4626 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4627 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4628 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4629 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4630 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4631 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4632 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4633 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4635 ----------------------------------
4636 Index Scan using t1_i1 on t1 t_1
4640 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
4641 NOTICE: nested_planner(5)
4642 NOTICE: nested_planner(4)
4643 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4644 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4645 NOTICE: nested_planner(3)
4646 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4647 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4648 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4649 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4650 NOTICE: nested_planner(2)
4651 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4652 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4653 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4654 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4655 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4656 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4657 NOTICE: nested_planner(1)
4658 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4659 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4660 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4661 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4662 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4663 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4664 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4665 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4673 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4674 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4675 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4676 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4677 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4678 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4679 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4680 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4688 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4689 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4690 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4691 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4692 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4693 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4701 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4702 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4703 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4704 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4712 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4713 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4722 ----------------------------------
4723 Index Scan using t1_i1 on t1 t_1
4727 ---- No. A-13-4 output of debugging log on hint status
4730 /*+HashJoin(t_1 t_2)*/
4731 EXPLAIN (COSTS false)
4732 SELECT nested_planner(2) FROM s1.t1 t_1
4733 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4735 NOTICE: nested_planner(2)
4736 NOTICE: nested_planner(1)
4737 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4738 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4746 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4747 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4756 --------------------------------------
4760 Hash Cond: (t_1.c1 = t_2.c1)
4761 -> Seq Scan on t1 t_1
4763 -> Seq Scan on t2 t_2
4767 /*+HashJoin(st_1 st_2)*/
4768 EXPLAIN (COSTS false)
4769 SELECT nested_planner(2) FROM s1.t1 st_1
4770 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4772 NOTICE: nested_planner(2)
4773 NOTICE: nested_planner(1)
4774 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4775 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4783 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4784 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4793 ----------------------------------------
4797 Hash Cond: (st_1.c1 = st_2.c1)
4798 -> Seq Scan on t1 st_1
4800 -> Seq Scan on t2 st_2
4804 /*+HashJoin(t_1 t_2)*/
4805 EXPLAIN (COSTS false)
4806 SELECT nested_planner(2) FROM s1.t1 st_1
4807 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4809 NOTICE: nested_planner(2)
4810 NOTICE: nested_planner(1)
4811 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4812 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4820 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4821 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4830 -----------------------------------------
4832 Merge Cond: (st_1.c1 = st_2.c1)
4833 -> Index Scan using t1_i1 on t1 st_1
4836 -> Seq Scan on t2 st_2
4840 /*+HashJoin(st_1 st_2)*/
4841 EXPLAIN (COSTS false)
4842 SELECT nested_planner(2) FROM s1.t1 t_1
4843 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4845 NOTICE: nested_planner(2)
4846 NOTICE: nested_planner(1)
4847 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4848 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4856 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4857 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4866 ----------------------------------------
4868 Merge Cond: (t_1.c1 = t_2.c1)
4869 -> Index Scan using t1_i1 on t1 t_1
4872 -> Seq Scan on t2 t_2
4876 /*+HashJoin(t_1 t_1)*/
4877 EXPLAIN (COSTS false)
4878 SELECT nested_planner(2) FROM s1.t1 t_1
4880 NOTICE: nested_planner(2)
4881 NOTICE: nested_planner(1)
4882 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4883 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4884 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4885 DETAIL: Relation name "t_1" is duplicated.
4886 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4887 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4895 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4896 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4905 ----------------------------------
4906 Index Scan using t1_i1 on t1 t_1
4910 CREATE OR REPLACE FUNCTION nested_planner_one_t(cnt int) RETURNS int AS $$
4914 RAISE NOTICE 'nested_planner_one_t(%)', cnt;
4920 EXECUTE '/*+ IndexScan(t_1) */'
4921 ' SELECT nested_planner_one_t($1) FROM s1.t1 t_1'
4922 ' ORDER BY t_1.c1 LIMIT 1'
4923 INTO new_cnt USING cnt - 1;
4927 $$ LANGUAGE plpgsql IMMUTABLE;
4928 EXPLAIN (COSTS false)
4929 SELECT nested_planner_one_t(2) FROM s1.t1 t_1
4930 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4932 NOTICE: nested_planner_one_t(2)
4933 NOTICE: nested_planner_one_t(1)
4934 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4935 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4937 ----------------------------------------
4939 Merge Cond: (t_1.c1 = t_2.c1)
4940 -> Index Scan using t1_i1 on t1 t_1
4943 -> Seq Scan on t2 t_2
4946 /*+HashJoin(t_1 t_1)*/
4947 EXPLAIN (COSTS false)
4948 SELECT nested_planner_one_t(2) FROM s1.t1 t_1
4949 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4951 NOTICE: nested_planner_one_t(2)
4952 NOTICE: nested_planner_one_t(1)
4953 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4954 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4962 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4963 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4964 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4965 DETAIL: Relation name "t_1" is duplicated.
4974 ----------------------------------------
4976 Merge Cond: (t_1.c1 = t_2.c1)
4977 -> Index Scan using t1_i1 on t1 t_1
4980 -> Seq Scan on t2 t_2
4983 DROP FUNCTION nested_planner_one_t(int);
4985 /*+HashJoin(t_1 t_1)*/
4986 EXPLAIN (COSTS false)
4987 SELECT nested_planner(2) FROM s1.t1 t_1
4988 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4990 NOTICE: nested_planner(2)
4991 NOTICE: nested_planner(1)
4992 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4993 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4994 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4995 DETAIL: Relation name "t_1" is duplicated.
4996 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4997 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
5005 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
5006 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
5007 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
5008 DETAIL: Relation name "t_1" is duplicated.
5017 ----------------------------------------
5019 Merge Cond: (t_1.c1 = t_2.c1)
5020 -> Index Scan using t1_i1 on t1 t_1
5023 -> Seq Scan on t2 t_2
5027 /*+MergeJoin(t_1 t_2)HashJoin(t_1 t_2)*/
5028 EXPLAIN (COSTS false)
5029 SELECT nested_planner(2) FROM s1.t1 t_1
5030 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
5032 INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
5033 DETAIL: Conflict join method hint.
5034 NOTICE: nested_planner(2)
5035 INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
5036 DETAIL: Conflict join method hint.
5037 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
5038 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
5039 NOTICE: nested_planner(1)
5040 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
5041 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
5050 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
5051 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
5061 --------------------------------------
5065 Hash Cond: (t_1.c1 = t_2.c1)
5066 -> Seq Scan on t1 t_1
5068 -> Seq Scan on t2 t_2