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
3070 ---- No. A-12-1 reset of global variable of core at the error
3071 ---- No. A-12-2 reset of global variable of original at the error
3073 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3075 ------------------------------------
3077 Merge Cond: (t1.c1 = t2.c1)
3078 -> Index Scan using t1_i1 on t1
3084 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3085 PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3086 INFO: hint syntax error at or near "NestLoop(t1 t1)"
3087 DETAIL: Relation name "t1" is duplicated.
3092 Set(enable_seqscan off)
3093 Set(geqo_threshold 100)
3099 EXPLAIN (COSTS false) EXECUTE p1;
3101 ------------------------------------
3103 Merge Cond: (t1.c1 = t2.c1)
3107 -> Index Scan using t2_i1 on t2
3112 SELECT name, setting FROM settings;
3114 ---------------------------+-----------
3117 geqo_generations | 0
3120 geqo_selection_bias | 2
3122 constraint_exclusion | partition
3123 cursor_tuple_fraction | 0.1
3124 default_statistics_target | 100
3125 from_collapse_limit | 8
3126 join_collapse_limit | 8
3127 cpu_index_tuple_cost | 0.005
3128 cpu_operator_cost | 0.0025
3129 cpu_tuple_cost | 0.01
3130 effective_cache_size | 16384
3131 random_page_cost | 4
3133 enable_bitmapscan | on
3135 enable_hashjoin | on
3136 enable_indexscan | on
3137 enable_material | on
3138 enable_mergejoin | on
3139 enable_nestloop | on
3143 client_min_messages | log
3146 SET pg_hint_plan.parse_messages TO error;
3147 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3148 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3149 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3150 DETAIL: Relation name "t1" is duplicated.
3151 SELECT name, setting FROM settings;
3153 ---------------------------+-----------
3156 geqo_generations | 0
3159 geqo_selection_bias | 2
3161 constraint_exclusion | partition
3162 cursor_tuple_fraction | 0.1
3163 default_statistics_target | 100
3164 from_collapse_limit | 8
3165 join_collapse_limit | 8
3166 cpu_index_tuple_cost | 0.005
3167 cpu_operator_cost | 0.0025
3168 cpu_tuple_cost | 0.01
3169 effective_cache_size | 16384
3170 random_page_cost | 4
3172 enable_bitmapscan | on
3174 enable_hashjoin | on
3175 enable_indexscan | on
3176 enable_material | on
3177 enable_mergejoin | on
3178 enable_nestloop | on
3182 client_min_messages | log
3185 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3186 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3191 Set(enable_seqscan off)
3192 Set(geqo_threshold 100)
3198 ------------------------------------
3200 Merge Cond: (t1.c1 = t2.c1)
3204 -> Index Scan using t2_i1 on t2
3209 SELECT name, setting FROM settings;
3211 ---------------------------+-----------
3214 geqo_generations | 0
3217 geqo_selection_bias | 2
3219 constraint_exclusion | partition
3220 cursor_tuple_fraction | 0.1
3221 default_statistics_target | 100
3222 from_collapse_limit | 8
3223 join_collapse_limit | 8
3224 cpu_index_tuple_cost | 0.005
3225 cpu_operator_cost | 0.0025
3226 cpu_tuple_cost | 0.01
3227 effective_cache_size | 16384
3228 random_page_cost | 4
3230 enable_bitmapscan | on
3232 enable_hashjoin | on
3233 enable_indexscan | on
3234 enable_material | on
3235 enable_mergejoin | on
3236 enable_nestloop | on
3240 client_min_messages | log
3243 SET pg_hint_plan.parse_messages TO error;
3244 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3245 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3246 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3247 DETAIL: Relation name "t1" is duplicated.
3248 SELECT name, setting FROM settings;
3250 ---------------------------+-----------
3253 geqo_generations | 0
3256 geqo_selection_bias | 2
3258 constraint_exclusion | partition
3259 cursor_tuple_fraction | 0.1
3260 default_statistics_target | 100
3261 from_collapse_limit | 8
3262 join_collapse_limit | 8
3263 cpu_index_tuple_cost | 0.005
3264 cpu_operator_cost | 0.0025
3265 cpu_tuple_cost | 0.01
3266 effective_cache_size | 16384
3267 random_page_cost | 4
3269 enable_bitmapscan | on
3271 enable_hashjoin | on
3272 enable_indexscan | on
3273 enable_material | on
3274 enable_mergejoin | on
3275 enable_nestloop | on
3279 client_min_messages | log
3282 EXPLAIN (COSTS false) EXECUTE p1;
3284 ------------------------------------
3286 Merge Cond: (t1.c1 = t2.c1)
3290 -> Index Scan using t2_i1 on t2
3295 SELECT name, setting FROM settings;
3297 ---------------------------+-----------
3300 geqo_generations | 0
3303 geqo_selection_bias | 2
3305 constraint_exclusion | partition
3306 cursor_tuple_fraction | 0.1
3307 default_statistics_target | 100
3308 from_collapse_limit | 8
3309 join_collapse_limit | 8
3310 cpu_index_tuple_cost | 0.005
3311 cpu_operator_cost | 0.0025
3312 cpu_tuple_cost | 0.01
3313 effective_cache_size | 16384
3314 random_page_cost | 4
3316 enable_bitmapscan | on
3318 enable_hashjoin | on
3319 enable_indexscan | on
3320 enable_material | on
3321 enable_mergejoin | on
3322 enable_nestloop | on
3326 client_min_messages | log
3329 SET pg_hint_plan.parse_messages TO error;
3330 EXPLAIN (COSTS false) EXECUTE p2;
3331 ERROR: prepared statement "p2" does not exist
3332 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3333 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3338 Set(enable_seqscan off)
3339 Set(geqo_threshold 100)
3345 ------------------------------------
3347 Merge Cond: (t1.c1 = t2.c1)
3351 -> Index Scan using t2_i1 on t2
3354 EXPLAIN (COSTS false) EXECUTE p1;
3356 ------------------------------------
3358 Merge Cond: (t1.c1 = t2.c1)
3362 -> Index Scan using t2_i1 on t2
3365 SELECT name, setting FROM settings;
3367 ---------------------------+-----------
3370 geqo_generations | 0
3373 geqo_selection_bias | 2
3375 constraint_exclusion | partition
3376 cursor_tuple_fraction | 0.1
3377 default_statistics_target | 100
3378 from_collapse_limit | 8
3379 join_collapse_limit | 8
3380 cpu_index_tuple_cost | 0.005
3381 cpu_operator_cost | 0.0025
3382 cpu_tuple_cost | 0.01
3383 effective_cache_size | 16384
3384 random_page_cost | 4
3386 enable_bitmapscan | on
3388 enable_hashjoin | on
3389 enable_indexscan | on
3390 enable_material | on
3391 enable_mergejoin | on
3392 enable_nestloop | on
3396 client_min_messages | log
3401 SELECT name, setting FROM settings;
3403 ---------------------------+-----------
3406 geqo_generations | 0
3409 geqo_selection_bias | 2
3411 constraint_exclusion | partition
3412 cursor_tuple_fraction | 0.1
3413 default_statistics_target | 100
3414 from_collapse_limit | 8
3415 join_collapse_limit | 8
3416 cpu_index_tuple_cost | 0.005
3417 cpu_operator_cost | 0.0025
3418 cpu_tuple_cost | 0.01
3419 effective_cache_size | 16384
3420 random_page_cost | 4
3422 enable_bitmapscan | on
3424 enable_hashjoin | on
3425 enable_indexscan | on
3426 enable_material | on
3427 enable_mergejoin | on
3428 enable_nestloop | on
3432 client_min_messages | log
3435 SET pg_hint_plan.parse_messages TO error;
3436 EXPLAIN (COSTS false) EXECUTE p2;
3437 ERROR: prepared statement "p2" does not exist
3438 EXPLAIN (COSTS false) EXECUTE p1;
3440 ------------------------------------
3442 Merge Cond: (t1.c1 = t2.c1)
3446 -> Index Scan using t2_i1 on t2
3449 SELECT name, setting FROM settings;
3451 ---------------------------+-----------
3454 geqo_generations | 0
3457 geqo_selection_bias | 2
3459 constraint_exclusion | partition
3460 cursor_tuple_fraction | 0.1
3461 default_statistics_target | 100
3462 from_collapse_limit | 8
3463 join_collapse_limit | 8
3464 cpu_index_tuple_cost | 0.005
3465 cpu_operator_cost | 0.0025
3466 cpu_tuple_cost | 0.01
3467 effective_cache_size | 16384
3468 random_page_cost | 4
3470 enable_bitmapscan | on
3472 enable_hashjoin | on
3473 enable_indexscan | on
3474 enable_material | on
3475 enable_mergejoin | on
3476 enable_nestloop | on
3480 client_min_messages | log
3484 SET pg_hint_plan.parse_messages TO LOG;
3486 ---- No. A-12-3 effective range of the hint
3488 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3490 ------------------------------------
3492 Merge Cond: (t1.c1 = t2.c1)
3493 -> Index Scan using t1_i1 on t1
3500 SET enable_indexscan TO off;
3501 SET enable_mergejoin TO off;
3502 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3504 ------------------------------
3506 Hash Cond: (t1.c1 = t2.c1)
3512 SELECT name, setting FROM settings;
3514 ---------------------------+-----------
3517 geqo_generations | 0
3520 geqo_selection_bias | 2
3522 constraint_exclusion | partition
3523 cursor_tuple_fraction | 0.1
3524 default_statistics_target | 100
3525 from_collapse_limit | 8
3526 join_collapse_limit | 8
3527 cpu_index_tuple_cost | 0.005
3528 cpu_operator_cost | 0.0025
3529 cpu_tuple_cost | 0.01
3530 effective_cache_size | 16384
3531 random_page_cost | 4
3533 enable_bitmapscan | on
3535 enable_hashjoin | on
3536 enable_indexscan | off
3537 enable_material | on
3538 enable_mergejoin | off
3539 enable_nestloop | on
3543 client_min_messages | log
3546 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3547 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3553 Set(enable_indexscan on)
3554 Set(geqo_threshold 100)
3560 ------------------------------------
3562 Merge Cond: (t1.c1 = t2.c1)
3563 -> Index Scan using t1_i1 on t1
3564 -> Index Scan using t2_i1 on t2
3567 SELECT name, setting FROM settings;
3569 ---------------------------+-----------
3572 geqo_generations | 0
3575 geqo_selection_bias | 2
3577 constraint_exclusion | partition
3578 cursor_tuple_fraction | 0.1
3579 default_statistics_target | 100
3580 from_collapse_limit | 8
3581 join_collapse_limit | 8
3582 cpu_index_tuple_cost | 0.005
3583 cpu_operator_cost | 0.0025
3584 cpu_tuple_cost | 0.01
3585 effective_cache_size | 16384
3586 random_page_cost | 4
3588 enable_bitmapscan | on
3590 enable_hashjoin | on
3591 enable_indexscan | off
3592 enable_material | on
3593 enable_mergejoin | off
3594 enable_nestloop | on
3598 client_min_messages | log
3601 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3603 ------------------------------
3605 Hash Cond: (t1.c1 = t2.c1)
3612 SET enable_indexscan TO off;
3613 SET enable_mergejoin TO off;
3614 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3616 ------------------------------
3618 Hash Cond: (t1.c1 = t2.c1)
3624 SELECT name, setting FROM settings;
3626 ---------------------------+-----------
3629 geqo_generations | 0
3632 geqo_selection_bias | 2
3634 constraint_exclusion | partition
3635 cursor_tuple_fraction | 0.1
3636 default_statistics_target | 100
3637 from_collapse_limit | 8
3638 join_collapse_limit | 8
3639 cpu_index_tuple_cost | 0.005
3640 cpu_operator_cost | 0.0025
3641 cpu_tuple_cost | 0.01
3642 effective_cache_size | 16384
3643 random_page_cost | 4
3645 enable_bitmapscan | on
3647 enable_hashjoin | on
3648 enable_indexscan | off
3649 enable_material | on
3650 enable_mergejoin | off
3651 enable_nestloop | on
3655 client_min_messages | log
3659 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3660 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3666 Set(enable_indexscan on)
3667 Set(geqo_threshold 100)
3673 ------------------------------------
3675 Merge Cond: (t1.c1 = t2.c1)
3676 -> Index Scan using t1_i1 on t1
3677 -> Index Scan using t2_i1 on t2
3682 SELECT name, setting FROM settings;
3684 ---------------------------+-----------
3687 geqo_generations | 0
3690 geqo_selection_bias | 2
3692 constraint_exclusion | partition
3693 cursor_tuple_fraction | 0.1
3694 default_statistics_target | 100
3695 from_collapse_limit | 8
3696 join_collapse_limit | 8
3697 cpu_index_tuple_cost | 0.005
3698 cpu_operator_cost | 0.0025
3699 cpu_tuple_cost | 0.01
3700 effective_cache_size | 16384
3701 random_page_cost | 4
3703 enable_bitmapscan | on
3705 enable_hashjoin | on
3706 enable_indexscan | off
3707 enable_material | on
3708 enable_mergejoin | off
3709 enable_nestloop | on
3713 client_min_messages | log
3716 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3718 ------------------------------
3720 Hash Cond: (t1.c1 = t2.c1)
3728 SET enable_indexscan TO off;
3729 SET enable_mergejoin TO off;
3730 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3732 ------------------------------
3734 Hash Cond: (t1.c1 = t2.c1)
3740 SELECT name, setting FROM settings;
3742 ---------------------------+-----------
3745 geqo_generations | 0
3748 geqo_selection_bias | 2
3750 constraint_exclusion | partition
3751 cursor_tuple_fraction | 0.1
3752 default_statistics_target | 100
3753 from_collapse_limit | 8
3754 join_collapse_limit | 8
3755 cpu_index_tuple_cost | 0.005
3756 cpu_operator_cost | 0.0025
3757 cpu_tuple_cost | 0.01
3758 effective_cache_size | 16384
3759 random_page_cost | 4
3761 enable_bitmapscan | on
3763 enable_hashjoin | on
3764 enable_indexscan | off
3765 enable_material | on
3766 enable_mergejoin | off
3767 enable_nestloop | on
3771 client_min_messages | log
3774 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3775 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3781 Set(enable_indexscan on)
3782 Set(geqo_threshold 100)
3788 ------------------------------------
3790 Merge Cond: (t1.c1 = t2.c1)
3791 -> Index Scan using t1_i1 on t1
3792 -> Index Scan using t2_i1 on t2
3796 SET enable_indexscan TO off;
3797 SET enable_mergejoin TO off;
3798 LOAD 'pg_hint_plan';
3799 SELECT name, setting FROM settings;
3801 ---------------------------+-----------
3804 geqo_generations | 0
3807 geqo_selection_bias | 2
3809 constraint_exclusion | partition
3810 cursor_tuple_fraction | 0.1
3811 default_statistics_target | 100
3812 from_collapse_limit | 8
3813 join_collapse_limit | 8
3814 cpu_index_tuple_cost | 0.005
3815 cpu_operator_cost | 0.0025
3816 cpu_tuple_cost | 0.01
3817 effective_cache_size | 16384
3818 random_page_cost | 4
3820 enable_bitmapscan | on
3822 enable_hashjoin | on
3823 enable_indexscan | off
3824 enable_material | on
3825 enable_mergejoin | off
3826 enable_nestloop | on
3830 client_min_messages | notice
3833 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3835 ------------------------------
3837 Hash Cond: (t1.c1 = t2.c1)
3843 SET pg_hint_plan.enable_hint TO on;
3844 SET pg_hint_plan.debug_print TO on;
3845 SET client_min_messages TO LOG;
3846 SET search_path TO public;
3847 RESET enable_indexscan;
3848 RESET enable_mergejoin;
3850 ---- No. A-13 call planner recursively
3852 CREATE OR REPLACE FUNCTION nested_planner(cnt int) RETURNS int AS $$
3856 RAISE NOTICE 'nested_planner(%)', cnt;
3863 EXECUTE '/*+ IndexScan(t_1) */'
3864 ' SELECT nested_planner($1) FROM s1.t1 t_1'
3865 ' JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)'
3866 ' ORDER BY t_1.c1 LIMIT 1'
3867 INTO new_cnt USING cnt - 1;
3871 $$ LANGUAGE plpgsql IMMUTABLE;
3873 ---- No. A-13-2 use hint of main query
3876 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3877 NOTICE: nested_planner(1)
3879 ----------------------------------
3880 Index Scan using t1_i1 on t1 t_1
3884 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3885 NOTICE: nested_planner(1)
3894 --------------------------
3897 -> Seq Scan on t1 t_1
3901 ---- No. A-13-3 output number of times of debugging log
3904 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3905 NOTICE: nested_planner(1)
3907 ----------------------------------
3908 Index Scan using t1_i1 on t1 t_1
3912 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3913 NOTICE: nested_planner(1)
3922 ----------------------------------
3923 Index Scan using t1_i1 on t1 t_1
3927 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
3928 NOTICE: nested_planner(2)
3929 NOTICE: nested_planner(1)
3930 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"
3931 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3933 ----------------------------------
3934 Index Scan using t1_i1 on t1 t_1
3938 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
3939 NOTICE: nested_planner(2)
3940 NOTICE: nested_planner(1)
3941 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"
3942 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3950 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"
3951 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3960 ----------------------------------
3961 Index Scan using t1_i1 on t1 t_1
3965 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
3966 NOTICE: nested_planner(5)
3967 NOTICE: nested_planner(4)
3968 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"
3969 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3970 NOTICE: nested_planner(3)
3971 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"
3972 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3973 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"
3974 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3975 NOTICE: nested_planner(2)
3976 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"
3977 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3978 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"
3979 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3980 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"
3981 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3982 NOTICE: nested_planner(1)
3983 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"
3984 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3985 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"
3986 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3987 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"
3988 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3989 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"
3990 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3992 ----------------------------------
3993 Index Scan using t1_i1 on t1 t_1
3997 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
3998 NOTICE: nested_planner(5)
3999 NOTICE: nested_planner(4)
4000 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"
4001 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4002 NOTICE: nested_planner(3)
4003 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"
4004 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4005 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"
4006 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4007 NOTICE: nested_planner(2)
4008 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"
4009 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4010 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"
4011 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4012 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"
4013 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4014 NOTICE: nested_planner(1)
4015 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"
4016 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4017 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"
4018 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4019 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"
4020 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4021 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"
4022 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4030 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"
4031 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4032 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"
4033 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4034 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"
4035 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4036 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"
4037 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4045 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"
4046 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4047 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"
4048 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4049 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"
4050 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4058 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"
4059 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4060 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"
4061 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4069 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"
4070 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4079 ----------------------------------
4080 Index Scan using t1_i1 on t1 t_1
4084 ---- No. A-13-4 output of debugging log on hint status
4087 /*+HashJoin(t_1 t_2)*/
4088 EXPLAIN (COSTS false)
4089 SELECT nested_planner(2) FROM s1.t1 t_1
4090 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4092 NOTICE: nested_planner(2)
4093 NOTICE: nested_planner(1)
4094 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"
4095 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4103 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"
4104 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4113 --------------------------------------
4117 Hash Cond: (t_1.c1 = t_2.c1)
4118 -> Seq Scan on t1 t_1
4120 -> Seq Scan on t2 t_2
4124 /*+HashJoin(st_1 st_2)*/
4125 EXPLAIN (COSTS false)
4126 SELECT nested_planner(2) FROM s1.t1 st_1
4127 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4129 NOTICE: nested_planner(2)
4130 NOTICE: nested_planner(1)
4131 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"
4132 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4140 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"
4141 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4150 ----------------------------------------
4154 Hash Cond: (st_1.c1 = st_2.c1)
4155 -> Seq Scan on t1 st_1
4157 -> Seq Scan on t2 st_2
4161 /*+HashJoin(t_1 t_2)*/
4162 EXPLAIN (COSTS false)
4163 SELECT nested_planner(2) FROM s1.t1 st_1
4164 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4166 NOTICE: nested_planner(2)
4167 NOTICE: nested_planner(1)
4168 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"
4169 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4177 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"
4178 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4187 -----------------------------------------
4189 Merge Cond: (st_1.c1 = st_2.c1)
4190 -> Index Scan using t1_i1 on t1 st_1
4193 -> Seq Scan on t2 st_2
4197 /*+HashJoin(st_1 st_2)*/
4198 EXPLAIN (COSTS false)
4199 SELECT nested_planner(2) FROM s1.t1 t_1
4200 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4202 NOTICE: nested_planner(2)
4203 NOTICE: nested_planner(1)
4204 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"
4205 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4213 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"
4214 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4223 ----------------------------------------
4225 Merge Cond: (t_1.c1 = t_2.c1)
4226 -> Index Scan using t1_i1 on t1 t_1
4229 -> Seq Scan on t2 t_2
4233 /*+HashJoin(t_1 t_1)*/
4234 EXPLAIN (COSTS false)
4235 SELECT nested_planner(2) FROM s1.t1 t_1
4237 NOTICE: nested_planner(2)
4238 NOTICE: nested_planner(1)
4239 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"
4240 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4241 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4242 DETAIL: Relation name "t_1" is duplicated.
4243 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"
4244 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4252 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"
4253 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4262 ----------------------------------
4263 Index Scan using t1_i1 on t1 t_1
4267 CREATE OR REPLACE FUNCTION nested_planner_one_t(cnt int) RETURNS int AS $$
4271 RAISE NOTICE 'nested_planner_one_t(%)', cnt;
4277 EXECUTE '/*+ IndexScan(t_1) */'
4278 ' SELECT nested_planner_one_t($1) FROM s1.t1 t_1'
4279 ' ORDER BY t_1.c1 LIMIT 1'
4280 INTO new_cnt USING cnt - 1;
4284 $$ LANGUAGE plpgsql IMMUTABLE;
4285 EXPLAIN (COSTS false)
4286 SELECT nested_planner_one_t(2) FROM s1.t1 t_1
4287 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4289 NOTICE: nested_planner_one_t(2)
4290 NOTICE: nested_planner_one_t(1)
4291 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4292 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4294 ----------------------------------------
4296 Merge Cond: (t_1.c1 = t_2.c1)
4297 -> Index Scan using t1_i1 on t1 t_1
4300 -> Seq Scan on t2 t_2
4303 /*+HashJoin(t_1 t_1)*/
4304 EXPLAIN (COSTS false)
4305 SELECT nested_planner_one_t(2) FROM s1.t1 t_1
4306 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4308 NOTICE: nested_planner_one_t(2)
4309 NOTICE: nested_planner_one_t(1)
4310 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4311 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4319 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4320 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4321 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4322 DETAIL: Relation name "t_1" is duplicated.
4331 ----------------------------------------
4333 Merge Cond: (t_1.c1 = t_2.c1)
4334 -> Index Scan using t1_i1 on t1 t_1
4337 -> Seq Scan on t2 t_2
4340 DROP FUNCTION nested_planner_one_t(int);
4342 /*+HashJoin(t_1 t_1)*/
4343 EXPLAIN (COSTS false)
4344 SELECT nested_planner(2) FROM s1.t1 t_1
4345 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4347 NOTICE: nested_planner(2)
4348 NOTICE: nested_planner(1)
4349 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"
4350 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4351 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4352 DETAIL: Relation name "t_1" is duplicated.
4353 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"
4354 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4362 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"
4363 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4364 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4365 DETAIL: Relation name "t_1" is duplicated.
4374 ----------------------------------------
4376 Merge Cond: (t_1.c1 = t_2.c1)
4377 -> Index Scan using t1_i1 on t1 t_1
4380 -> Seq Scan on t2 t_2
4384 /*+MergeJoin(t_1 t_2)HashJoin(t_1 t_2)*/
4385 EXPLAIN (COSTS false)
4386 SELECT nested_planner(2) FROM s1.t1 t_1
4387 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4389 INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4390 DETAIL: Conflict join method hint.
4391 NOTICE: nested_planner(2)
4392 INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4393 DETAIL: Conflict join method hint.
4394 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"
4395 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4396 NOTICE: nested_planner(1)
4397 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"
4398 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4407 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"
4408 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4418 --------------------------------------
4422 Hash Cond: (t_1.c1 = t_2.c1)
4423 -> Seq Scan on t1 t_1
4425 -> Seq Scan on t2 t_2