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
11 CREATE EXTENSION pg_hint_plan;
13 DROP EXTENSION pg_hint_plan;
15 CREATE EXTENSION pg_hint_plan SCHEMA other_name;
16 ERROR: extension "pg_hint_plan" must be installed in schema "hint_plan"
17 CREATE EXTENSION pg_hint_plan;
19 ---- No. A-5-1 comment pattern
23 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
39 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
41 ------------------------------
42 Index Scan using t1_i1 on t1
48 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
50 ------------------------------
51 Index Scan using t1_i1 on t1
57 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
59 ------------------------------
60 Index Scan using t1_i1 on t1
66 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
68 ------------------------------
69 Index Scan using t1_i1 on t1
75 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
77 ------------------------------
78 Index Scan using t1_i1 on t1
83 /*+SeqScan(t1) /* nest comment */ */
84 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
85 INFO: hint syntax error at or near "/* nest comment */ */
86 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
87 DETAIL: Nested block comments are not supported.
89 ------------------------------
90 Index Scan using t1_i1 on t1
95 /* +SeqScan(t1) /* nest comment */ */
96 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
98 ------------------------------
99 Index Scan using t1_i1 on t1
104 /*SeqScan(t1) /* nest comment */ */
105 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
107 ------------------------------
108 Index Scan using t1_i1 on t1
113 ---- No. A-5-2 hint position
117 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
134 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
136 ------------------------------
137 Index Scan using t1_i1 on t1
142 EXPLAIN (COSTS false) SELECT /*+SeqScan(t1)*/ * FROM s1.t1 WHERE t1.c1 = 1;
144 ------------------------------
145 Index Scan using t1_i1 on t1
152 ---- No. A-6-1 hint's table definition
158 ---- No. A-6-2 search condition
169 ---- No. A-6-3 number of constant
178 ---- No. A-7-2 hint delimiter
180 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
182 ------------------------------
183 Index Scan using t1_i1 on t1
194 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
195 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
198 Set(enable_bitmapscan off)
199 Set(enable_indexscan off)
211 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
212 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
215 Set(enable_bitmapscan off)
216 Set(enable_indexscan off)
228 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
229 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
232 Set(enable_bitmapscan off)
233 Set(enable_indexscan off)
245 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
246 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
249 Set(enable_bitmapscan off)
250 Set(enable_indexscan off)
262 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
263 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
266 Set(enable_bitmapscan off)
267 Set(enable_indexscan off)
279 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
280 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
283 Set(enable_bitmapscan off)
284 Set(enable_indexscan off)
296 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
297 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
300 Set(enable_bitmapscan off)
301 Set(enable_indexscan off)
313 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
314 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
317 Set(enable_bitmapscan off)
318 Set(enable_indexscan off)
330 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
331 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
334 Set(enable_bitmapscan off)
335 Set(enable_indexscan off)
347 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
348 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
351 Set(enable_bitmapscan off)
352 Set(enable_indexscan off)
364 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
365 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
368 Set(enable_bitmapscan off)
369 Set(enable_indexscan off)
381 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
382 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
385 Set(enable_bitmapscan off)
386 Set(enable_indexscan off)
398 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
399 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
402 Set(enable_bitmapscan off)
403 Set(enable_indexscan off)
415 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
416 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
419 Set(enable_bitmapscan off)
420 Set(enable_indexscan off)
432 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
433 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
436 Set(enable_bitmapscan off)
437 Set(enable_indexscan off)
450 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
451 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
454 Set(enable_bitmapscan off)
455 Set(enable_indexscan off)
467 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
469 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
472 Set(enable_bitmapscan off)
473 Set(enable_indexscan off)
487 (enable_indexscan"off")
489 (enable_bitmapscan"off")*/
490 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
493 Set(enable_bitmapscan off)
494 Set(enable_indexscan off)
508 enable_indexscan"off")Set
510 enable_bitmapscan"off")*/
511 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
514 Set(enable_bitmapscan off)
515 Set(enable_indexscan off)
527 /*+Set(enable_indexscan"off"
529 Set(enable_bitmapscan"off"
532 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
535 Set(enable_bitmapscan off)
536 Set(enable_indexscan off)
555 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
558 Set(enable_bitmapscan off)
559 Set(enable_indexscan off)
583 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
586 Set(enable_bitmapscan off)
587 Set(enable_indexscan off)
600 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
601 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
604 Set(enable_bitmapscan off)
605 Set(enable_indexscan off)
617 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
619 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
622 Set(enable_bitmapscan off)
623 Set(enable_indexscan off)
637 (enable_indexscan"off")
639 (enable_bitmapscan"off")*/
640 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
643 Set(enable_bitmapscan off)
644 Set(enable_indexscan off)
658 enable_indexscan"off")Set
660 enable_bitmapscan"off")*/
661 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
664 Set(enable_bitmapscan off)
665 Set(enable_indexscan off)
677 /*+Set(enable_indexscan"off"
679 Set(enable_bitmapscan"off"
682 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
685 Set(enable_bitmapscan off)
686 Set(enable_indexscan off)
705 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
708 Set(enable_bitmapscan off)
709 Set(enable_indexscan off)
733 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
736 Set(enable_bitmapscan off)
737 Set(enable_indexscan off)
749 ---- No. A-7-3 hint object pattern
750 ---- No. A-9-2 message object pattern
755 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
770 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
785 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
800 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
817 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
832 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
841 ----------------------
847 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
862 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
871 ----------------------
879 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
894 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
903 ----------------------
909 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
924 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
933 ----------------------
941 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
942 INFO: hint syntax error at or near ")"
943 DETAIL: SeqScan hint requires a relation.
944 INFO: hint syntax error at or near ")"
945 DETAIL: Unrecognized hint keyword ")".
954 ----------------------------------
955 Index Scan using t1_i1 on t1 ")"
960 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
975 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")))" WHERE ")))".c1 = 1;
984 ----------------------
992 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
993 INFO: hint syntax error at or near ""
994 DETAIL: Unterminated quoted string.
996 -----------------------------------
997 Index Scan using t1_i1 on t1 """"
1002 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
1011 ---------------------
1016 /*+SeqScan("""""""")*/
1017 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """""""" WHERE """""""".c1 = 1;
1026 -------------------------
1027 Seq Scan on t1 """"""""
1034 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1035 INFO: hint syntax error at or near ""
1036 DETAIL: SeqScan hint requires a relation.
1045 ----------------------------------
1046 Index Scan using t1_i1 on t1 " "
1047 Index Cond: (c1 = 1)
1051 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1060 --------------------
1066 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1075 ----------------------
1083 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1084 INFO: hint syntax error at or near ""
1085 DETAIL: SeqScan hint requires a relation.
1094 -----------------------------------
1095 Index Scan using t1_i1 on t1 " "
1096 Index Cond: (c1 = 1)
1100 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1109 ---------------------------
1115 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1124 -------------------------------------------
1133 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1136 INFO: hint syntax error at or near ""
1137 DETAIL: SeqScan hint requires a relation.
1146 --------------------------------
1147 Index Scan using t1_i1 on t1 "
1149 Index Cond: (c1 = 1)
1154 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1166 --------------------
1176 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1194 --------------------
1205 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1214 ----------------------
1215 Seq Scan on t1 "Set"
1220 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1229 ----------------------
1230 Seq Scan on t1 "Set"
1234 /*+SeqScan("Set SeqScan Leading")*/
1235 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set SeqScan Leading" WHERE "Set SeqScan Leading".c1 = 1;
1238 SeqScan("Set SeqScan Leading")
1244 --------------------------------------
1245 Seq Scan on t1 "Set SeqScan Leading"
1252 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1261 ---------------------
1267 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1276 -------------------------
1277 Seq Scan on t1 "あいう"
1282 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1291 ---------------------
1297 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1306 -------------------------
1307 Seq Scan on t1 "あいう"
1314 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;
1315 INFO: hint syntax error at or near "/**/)*/
1316 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;"
1317 DETAIL: Nested block comments are not supported.
1319 -------------------------------------
1320 Index Scan using t1_i1 on t1 "/**/"
1321 Index Cond: (c1 = 1)
1324 /*+SeqScan(/**//**//**/)*/
1325 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;
1326 INFO: hint syntax error at or near "/**//**//**/)*/
1327 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;"
1328 DETAIL: Nested block comments are not supported.
1330 ---------------------------------------------
1331 Index Scan using t1_i1 on t1 "/**//**//**/"
1332 Index Cond: (c1 = 1)
1339 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1340 Set/**/あ" WHERE "tT()""
1342 INFO: hint syntax error at or near "/**/あ")*/
1343 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1344 Set/**/あ" WHERE "tT()""
1346 DETAIL: Nested block comments are not supported.
1348 ------------------------------------------
1349 Index Scan using t1_i1 on t1 "tT()""
1351 Index Cond: (c1 = 1)
1357 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1369 --------------------------
1370 Seq Scan on t1 "tT()""
1376 ---- No. A-7-4 hint parse error
1379 /*+Set(enable_indexscan off)Set enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1380 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1381 INFO: hint syntax error at or near "enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1382 DETAIL: Opening parenthesis is necessary.
1385 Set(enable_indexscan off)
1391 ----------------------------------
1392 Bitmap Heap Scan on t1
1393 Recheck Cond: (c1 = 1)
1394 -> Bitmap Index Scan on t1_i1
1395 Index Cond: (c1 = 1)
1399 /*+Set(enable_indexscan off)Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)*/
1400 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1401 INFO: hint syntax error at or near "Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)"
1402 DETAIL: Set hint requires name and value of GUC parameter.
1406 Set(enable_indexscan off)
1410 Set(enable_tidscan off Set(enable_bitmapscan off)
1413 --------------------
1419 /*+Set(enable_indexscan off)Set(enable_tidscan "off)Set(enable_bitmapscan off)SeqScan(t1)*/
1420 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1421 INFO: hint syntax error at or near ""
1422 DETAIL: Unterminated quoted string.
1425 Set(enable_indexscan off)
1431 ----------------------------------
1432 Bitmap Heap Scan on t1
1433 Recheck Cond: (c1 = 1)
1434 -> Bitmap Index Scan on t1_i1
1435 Index Cond: (c1 = 1)
1439 /*+Set(enable_indexscan off)SeqScan("")Set(enable_bitmapscan off)*/
1440 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1441 INFO: hint syntax error at or near ")Set(enable_bitmapscan off)"
1442 DETAIL: Zero-length delimited string.
1445 Set(enable_indexscan off)
1451 ----------------------------------
1452 Bitmap Heap Scan on t1
1453 Recheck Cond: (c1 = 1)
1454 -> Bitmap Index Scan on t1_i1
1455 Index Cond: (c1 = 1)
1459 /*+Set(enable_indexscan off)NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1460 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1461 INFO: hint syntax error at or near "NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1462 DETAIL: Unrecognized hint keyword "NoSet".
1465 Set(enable_indexscan off)
1471 ----------------------------------
1472 Bitmap Heap Scan on t1
1473 Recheck Cond: (c1 = 1)
1474 -> Bitmap Index Scan on t1_i1
1475 Index Cond: (c1 = 1)
1479 /*+Set(enable_indexscan off)"Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1480 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1481 INFO: hint syntax error at or near ""Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1482 DETAIL: Unrecognized hint keyword ""Set"".
1485 Set(enable_indexscan off)
1491 ----------------------------------
1492 Bitmap Heap Scan on t1
1493 Recheck Cond: (c1 = 1)
1494 -> Bitmap Index Scan on t1_i1
1495 Index Cond: (c1 = 1)
1499 /*+Set(enable_indexscan off)Set(enable_tidscan /* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1500 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1501 INFO: hint syntax error at or near "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1502 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
1503 DETAIL: Nested block comments are not supported.
1505 ------------------------------
1506 Index Scan using t1_i1 on t1
1507 Index Cond: (c1 = 1)
1511 ---- No. A-8-1 original GUC parameter
1514 SET ROLE super_user;
1515 SET pg_hint_plan.debug_print TO off;
1516 SHOW pg_hint_plan.enable_hint;
1517 pg_hint_plan.enable_hint
1518 --------------------------
1522 SHOW pg_hint_plan.debug_print;
1523 pg_hint_plan.debug_print
1524 --------------------------
1528 SHOW pg_hint_plan.parse_messages;
1529 pg_hint_plan.parse_messages
1530 -----------------------------
1534 SET pg_hint_plan.enable_hint TO off;
1535 SET pg_hint_plan.debug_print TO on;
1536 SET pg_hint_plan.parse_messages TO error;
1537 SHOW pg_hint_plan.enable_hint;
1538 pg_hint_plan.enable_hint
1539 --------------------------
1543 SHOW pg_hint_plan.debug_print;
1544 pg_hint_plan.debug_print
1545 --------------------------
1549 SHOW pg_hint_plan.parse_messages;
1550 pg_hint_plan.parse_messages
1551 -----------------------------
1555 RESET pg_hint_plan.enable_hint;
1556 RESET pg_hint_plan.debug_print;
1557 RESET pg_hint_plan.parse_messages;
1558 SHOW pg_hint_plan.enable_hint;
1559 pg_hint_plan.enable_hint
1560 --------------------------
1564 SHOW pg_hint_plan.debug_print;
1565 pg_hint_plan.debug_print
1566 --------------------------
1570 SHOW pg_hint_plan.parse_messages;
1571 pg_hint_plan.parse_messages
1572 -----------------------------
1577 SET ROLE normal_user;
1578 SHOW pg_hint_plan.enable_hint;
1579 pg_hint_plan.enable_hint
1580 --------------------------
1584 SHOW pg_hint_plan.debug_print;
1585 pg_hint_plan.debug_print
1586 --------------------------
1590 SHOW pg_hint_plan.parse_messages;
1591 pg_hint_plan.parse_messages
1592 -----------------------------
1596 SET pg_hint_plan.enable_hint TO off;
1597 SET pg_hint_plan.debug_print TO on;
1598 SET pg_hint_plan.parse_messages TO error;
1599 SHOW pg_hint_plan.enable_hint;
1600 pg_hint_plan.enable_hint
1601 --------------------------
1605 SHOW pg_hint_plan.debug_print;
1606 pg_hint_plan.debug_print
1607 --------------------------
1611 SHOW pg_hint_plan.parse_messages;
1612 pg_hint_plan.parse_messages
1613 -----------------------------
1617 RESET pg_hint_plan.enable_hint;
1618 RESET pg_hint_plan.debug_print;
1619 RESET pg_hint_plan.parse_messages;
1620 SHOW pg_hint_plan.enable_hint;
1621 pg_hint_plan.enable_hint
1622 --------------------------
1626 SHOW pg_hint_plan.debug_print;
1627 pg_hint_plan.debug_print
1628 --------------------------
1632 SHOW pg_hint_plan.parse_messages;
1633 pg_hint_plan.parse_messages
1634 -----------------------------
1640 ---- No. A-8-2 original GUC parameter pg_hint_plan.enable_hint
1643 SET pg_hint_plan.enable_hint TO on;
1644 SHOW pg_hint_plan.enable_hint;
1645 pg_hint_plan.enable_hint
1646 --------------------------
1650 /*+Set(enable_indexscan off)*/
1651 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1653 ----------------------------------
1654 Bitmap Heap Scan on t1
1655 Recheck Cond: (c1 = 1)
1656 -> Bitmap Index Scan on t1_i1
1657 Index Cond: (c1 = 1)
1661 SET pg_hint_plan.enable_hint TO off;
1662 SHOW pg_hint_plan.enable_hint;
1663 pg_hint_plan.enable_hint
1664 --------------------------
1668 /*+Set(enable_indexscan off)*/
1669 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1671 ------------------------------
1672 Index Scan using t1_i1 on t1
1673 Index Cond: (c1 = 1)
1677 SET pg_hint_plan.enable_hint TO DEFAULT;
1678 SHOW pg_hint_plan.enable_hint;
1679 pg_hint_plan.enable_hint
1680 --------------------------
1684 /*+Set(enable_indexscan off)*/
1685 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1687 ----------------------------------
1688 Bitmap Heap Scan on t1
1689 Recheck Cond: (c1 = 1)
1690 -> Bitmap Index Scan on t1_i1
1691 Index Cond: (c1 = 1)
1695 SET pg_hint_plan.enable_hint TO enable;
1696 ERROR: parameter "pg_hint_plan.enable_hint" requires a Boolean value
1697 SHOW pg_hint_plan.enable_hint;
1698 pg_hint_plan.enable_hint
1699 --------------------------
1704 ---- No. A-8-3 original GUC parameter pg_hint_plan.debug_print
1707 SET pg_hint_plan.debug_print TO on;
1708 SHOW pg_hint_plan.debug_print;
1709 pg_hint_plan.debug_print
1710 --------------------------
1714 /*+Set(enable_indexscan off)*/
1715 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1718 Set(enable_indexscan off)
1724 ----------------------------------
1725 Bitmap Heap Scan on t1
1726 Recheck Cond: (c1 = 1)
1727 -> Bitmap Index Scan on t1_i1
1728 Index Cond: (c1 = 1)
1732 SET pg_hint_plan.debug_print TO off;
1733 SHOW pg_hint_plan.debug_print;
1734 pg_hint_plan.debug_print
1735 --------------------------
1739 /*+Set(enable_indexscan off)*/
1740 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1742 ----------------------------------
1743 Bitmap Heap Scan on t1
1744 Recheck Cond: (c1 = 1)
1745 -> Bitmap Index Scan on t1_i1
1746 Index Cond: (c1 = 1)
1750 SET pg_hint_plan.debug_print TO DEFAULT;
1751 SHOW pg_hint_plan.debug_print;
1752 pg_hint_plan.debug_print
1753 --------------------------
1757 /*+Set(enable_indexscan off)*/
1758 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1760 ----------------------------------
1761 Bitmap Heap Scan on t1
1762 Recheck Cond: (c1 = 1)
1763 -> Bitmap Index Scan on t1_i1
1764 Index Cond: (c1 = 1)
1768 SET pg_hint_plan.debug_print TO enable;
1769 ERROR: parameter "pg_hint_plan.debug_print" requires a Boolean value
1770 SHOW pg_hint_plan.debug_print;
1771 pg_hint_plan.debug_print
1772 --------------------------
1777 ---- No. A-8-4 original GUC parameter pg_hint_plan.parse_messages
1779 SET client_min_messages TO debug5;
1780 DEBUG: CommitTransactionCommand
1781 DEBUG: CommitTransaction
1782 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1784 SET pg_hint_plan.parse_messages TO debug5;
1785 DEBUG: StartTransactionCommand
1786 DEBUG: StartTransaction
1787 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1788 DEBUG: ProcessUtility
1789 DEBUG: CommitTransactionCommand
1790 DEBUG: CommitTransaction
1791 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1792 SHOW pg_hint_plan.parse_messages;
1793 DEBUG: StartTransactionCommand
1794 DEBUG: StartTransaction
1795 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1796 DEBUG: ProcessUtility
1797 DEBUG: CommitTransactionCommand
1798 DEBUG: CommitTransaction
1799 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1800 pg_hint_plan.parse_messages
1801 -----------------------------
1806 DEBUG: StartTransactionCommand
1807 DEBUG: StartTransaction
1808 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1809 DEBUG: hint syntax error at or near ""
1810 DETAIL: Opening parenthesis is necessary.
1811 DEBUG: CommitTransactionCommand
1812 DEBUG: CommitTransaction
1813 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1819 SET client_min_messages TO debug4;
1820 DEBUG: StartTransactionCommand
1821 DEBUG: StartTransaction
1822 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1823 DEBUG: ProcessUtility
1824 DEBUG: CommitTransactionCommand
1825 DEBUG: CommitTransaction
1826 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1828 DEBUG: StartTransactionCommand
1829 DEBUG: StartTransaction
1830 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1831 DEBUG: CommitTransactionCommand
1832 DEBUG: CommitTransaction
1833 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1840 SET pg_hint_plan.parse_messages TO debug4;
1841 DEBUG: StartTransactionCommand
1842 DEBUG: StartTransaction
1843 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1844 DEBUG: ProcessUtility
1845 DEBUG: CommitTransactionCommand
1846 DEBUG: CommitTransaction
1847 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1848 SHOW pg_hint_plan.parse_messages;
1849 DEBUG: StartTransactionCommand
1850 DEBUG: StartTransaction
1851 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1852 DEBUG: ProcessUtility
1853 DEBUG: CommitTransactionCommand
1854 DEBUG: CommitTransaction
1855 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1856 pg_hint_plan.parse_messages
1857 -----------------------------
1862 DEBUG: StartTransactionCommand
1863 DEBUG: StartTransaction
1864 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1865 DEBUG: hint syntax error at or near ""
1866 DETAIL: Opening parenthesis is necessary.
1867 DEBUG: CommitTransactionCommand
1868 DEBUG: CommitTransaction
1869 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1875 SET client_min_messages TO debug3;
1876 DEBUG: StartTransactionCommand
1877 DEBUG: StartTransaction
1878 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1879 DEBUG: ProcessUtility
1880 DEBUG: CommitTransactionCommand
1881 DEBUG: CommitTransaction
1882 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1884 DEBUG: StartTransactionCommand
1885 DEBUG: StartTransaction
1886 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1887 DEBUG: CommitTransactionCommand
1888 DEBUG: CommitTransaction
1889 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1896 SET pg_hint_plan.parse_messages TO debug3;
1897 DEBUG: StartTransactionCommand
1898 DEBUG: StartTransaction
1899 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1900 DEBUG: ProcessUtility
1901 DEBUG: CommitTransactionCommand
1902 DEBUG: CommitTransaction
1903 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1904 SHOW pg_hint_plan.parse_messages;
1905 DEBUG: StartTransactionCommand
1906 DEBUG: StartTransaction
1907 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1908 DEBUG: ProcessUtility
1909 DEBUG: CommitTransactionCommand
1910 DEBUG: CommitTransaction
1911 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1912 pg_hint_plan.parse_messages
1913 -----------------------------
1918 DEBUG: StartTransactionCommand
1919 DEBUG: StartTransaction
1920 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1921 DEBUG: hint syntax error at or near ""
1922 DETAIL: Opening parenthesis is necessary.
1923 DEBUG: CommitTransactionCommand
1924 DEBUG: CommitTransaction
1925 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1931 SET client_min_messages TO debug2;
1932 DEBUG: StartTransactionCommand
1933 DEBUG: StartTransaction
1934 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1935 DEBUG: ProcessUtility
1943 SET pg_hint_plan.parse_messages TO debug2;
1944 SHOW pg_hint_plan.parse_messages;
1945 pg_hint_plan.parse_messages
1946 -----------------------------
1951 DEBUG: hint syntax error at or near ""
1952 DETAIL: Opening parenthesis is necessary.
1958 SET client_min_messages TO debug1;
1966 SET pg_hint_plan.parse_messages TO debug1;
1967 SHOW pg_hint_plan.parse_messages;
1968 pg_hint_plan.parse_messages
1969 -----------------------------
1974 DEBUG: hint syntax error at or near ""
1975 DETAIL: Opening parenthesis is necessary.
1981 SET client_min_messages TO log;
1989 SET pg_hint_plan.parse_messages TO log;
1990 SHOW pg_hint_plan.parse_messages;
1991 pg_hint_plan.parse_messages
1992 -----------------------------
1997 LOG: hint syntax error at or near ""
1998 DETAIL: Opening parenthesis is necessary.
2004 SET client_min_messages TO info;
2012 SET pg_hint_plan.parse_messages TO info;
2013 SHOW pg_hint_plan.parse_messages;
2014 pg_hint_plan.parse_messages
2015 -----------------------------
2020 INFO: hint syntax error at or near ""
2021 DETAIL: Opening parenthesis is necessary.
2027 SET client_min_messages TO notice;
2029 INFO: hint syntax error at or near ""
2030 DETAIL: Opening parenthesis is necessary.
2037 SET pg_hint_plan.parse_messages TO notice;
2038 SHOW pg_hint_plan.parse_messages;
2039 pg_hint_plan.parse_messages
2040 -----------------------------
2045 NOTICE: hint syntax error at or near ""
2046 DETAIL: Opening parenthesis is necessary.
2052 SET client_min_messages TO warning;
2060 SET pg_hint_plan.parse_messages TO warning;
2061 SHOW pg_hint_plan.parse_messages;
2062 pg_hint_plan.parse_messages
2063 -----------------------------
2068 WARNING: hint syntax error at or near ""
2069 DETAIL: Opening parenthesis is necessary.
2075 SET client_min_messages TO error;
2083 SET pg_hint_plan.parse_messages TO error;
2084 SHOW pg_hint_plan.parse_messages;
2085 pg_hint_plan.parse_messages
2086 -----------------------------
2091 ERROR: hint syntax error at or near ""
2092 DETAIL: Opening parenthesis is necessary.
2093 SET client_min_messages TO fatal;
2096 RESET client_min_messages;
2097 SET pg_hint_plan.parse_messages TO DEFAULT;
2098 SHOW pg_hint_plan.parse_messages;
2099 pg_hint_plan.parse_messages
2100 -----------------------------
2105 INFO: hint syntax error at or near ""
2106 DETAIL: Opening parenthesis is necessary.
2113 SET pg_hint_plan.parse_messages TO fatal;
2114 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "fatal"
2115 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2116 SHOW pg_hint_plan.parse_messages;
2117 pg_hint_plan.parse_messages
2118 -----------------------------
2123 SET pg_hint_plan.parse_messages TO panic;
2124 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "panic"
2125 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2126 SHOW pg_hint_plan.parse_messages;
2127 pg_hint_plan.parse_messages
2128 -----------------------------
2133 SET pg_hint_plan.parse_messages TO on;
2134 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "on"
2135 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2136 SHOW pg_hint_plan.parse_messages;
2137 pg_hint_plan.parse_messages
2138 -----------------------------
2143 ---- No. A-8-5 original GUC parameter pg_hint_plan.enable_hint_table
2155 ---- No. A-9-1 parse error message output
2158 /*+"Set"(enable_indexscan on)*/SELECT 1;
2159 INFO: hint syntax error at or near ""Set"(enable_indexscan on)"
2160 DETAIL: Unrecognized hint keyword ""Set"".
2166 /*+Set()(enable_indexscan on)*/SELECT 1;
2167 INFO: hint syntax error at or near "Set()(enable_indexscan on)"
2168 DETAIL: Set hint requires name and value of GUC parameter.
2169 INFO: hint syntax error at or near "(enable_indexscan on)"
2170 DETAIL: Unrecognized hint keyword "".
2176 /*+Set(enable_indexscan on*/SELECT 1;
2177 INFO: hint syntax error at or near ""
2178 DETAIL: Closing parenthesis is necessary.
2185 ---- No. A-9-3 hint state output
2187 SET pg_hint_plan.debug_print TO on;
2188 SET client_min_messages TO LOG;
2191 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2200 --------------------
2206 /*+SeqScan(no_table)*/
2207 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2216 ------------------------------
2217 Index Scan using t1_i1 on t1
2218 Index Cond: (c1 = 1)
2222 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2224 -----------------------------------
2226 TID Cond: (ctid = '(1,1)'::tid)
2230 /*+TidScan(t1)BitmapScan(t1)*/
2231 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2232 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)"
2233 DETAIL: Conflict scan method hint.
2243 ----------------------------------
2244 Bitmap Heap Scan on t1
2245 Recheck Cond: (c1 = 1)
2246 Filter: (ctid = '(1,1)'::tid)
2247 -> Bitmap Index Scan on t1_i1
2248 Index Cond: (c1 = 1)
2251 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)*/
2252 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2253 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)"
2254 DETAIL: Conflict scan method hint.
2255 INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)"
2256 DETAIL: Conflict scan method hint.
2267 ---------------------------------
2268 Index Scan using t1_i1 on t1
2269 Index Cond: (c1 = 1)
2270 Filter: (ctid = '(1,1)'::tid)
2273 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)*/
2274 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2275 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2276 DETAIL: Conflict scan method hint.
2277 INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2278 DETAIL: Conflict scan method hint.
2279 INFO: hint syntax error at or near "IndexScan(t1)SeqScan(t1)"
2280 DETAIL: Conflict scan method hint.
2292 ------------------------------------------------
2294 Filter: ((c1 = 1) AND (ctid = '(1,1)'::tid))
2298 /*+Set(enable_indexscan enable)*/
2299 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2300 INFO: parameter "enable_indexscan" requires a Boolean value
2306 Set(enable_indexscan enable)
2309 ------------------------------
2310 Index Scan using t1_i1 on t1
2311 Index Cond: (c1 = 1)
2315 ---- No. A-10-1 hint state output
2317 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2318 EXPLAIN (COSTS false) EXECUTE p1;
2320 ------------------------------
2321 Index Scan using t1_i1 on t1
2322 Index Cond: (c1 = 1)
2326 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2327 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2329 ---------------------
2334 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2336 ---------------------
2341 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2343 ---------------------
2348 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2350 ---------------------
2355 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2357 ---------------------
2362 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2364 ---------------------
2373 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2382 EXPLAIN (COSTS false) EXECUTE p1;
2384 --------------------
2389 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2391 EXPLAIN (COSTS false) EXECUTE p1;
2400 --------------------
2407 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2416 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2418 ----------------------------------
2419 Bitmap Heap Scan on t1
2420 Recheck Cond: (c1 < $1)
2421 -> Bitmap Index Scan on t1_i1
2422 Index Cond: (c1 < $1)
2426 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2428 ----------------------------------
2429 Bitmap Heap Scan on t1
2430 Recheck Cond: (c1 < $1)
2431 -> Bitmap Index Scan on t1_i1
2432 Index Cond: (c1 < $1)
2436 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2438 ----------------------------------
2439 Bitmap Heap Scan on t1
2440 Recheck Cond: (c1 < $1)
2441 -> Bitmap Index Scan on t1_i1
2442 Index Cond: (c1 < $1)
2446 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2448 ----------------------------------
2449 Bitmap Heap Scan on t1
2450 Recheck Cond: (c1 < $1)
2451 -> Bitmap Index Scan on t1_i1
2452 Index Cond: (c1 < $1)
2456 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2458 ----------------------------------
2459 Bitmap Heap Scan on t1
2460 Recheck Cond: (c1 < $1)
2461 -> Bitmap Index Scan on t1_i1
2462 Index Cond: (c1 < $1)
2466 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2468 ----------------------------------
2469 Bitmap Heap Scan on t1
2470 Recheck Cond: (c1 < $1)
2471 -> Bitmap Index Scan on t1_i1
2472 Index Cond: (c1 < $1)
2475 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2477 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2486 ----------------------------------
2487 Bitmap Heap Scan on t1
2488 Recheck Cond: (c1 < $1)
2489 -> Bitmap Index Scan on t1_i1
2490 Index Cond: (c1 < $1)
2497 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2505 EXPLAIN (COSTS false) EXECUTE p1;
2507 --------------------
2512 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2513 EXPLAIN (COSTS false) EXECUTE p1;
2522 --------------------
2529 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2537 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2539 ----------------------------------
2540 Bitmap Heap Scan on t1
2541 Recheck Cond: (c1 < $1)
2542 -> Bitmap Index Scan on t1_i1
2543 Index Cond: (c1 < $1)
2546 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2548 ----------------------------------
2549 Bitmap Heap Scan on t1
2550 Recheck Cond: (c1 < $1)
2551 -> Bitmap Index Scan on t1_i1
2552 Index Cond: (c1 < $1)
2555 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2557 ----------------------------------
2558 Bitmap Heap Scan on t1
2559 Recheck Cond: (c1 < $1)
2560 -> Bitmap Index Scan on t1_i1
2561 Index Cond: (c1 < $1)
2564 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2566 ----------------------------------
2567 Bitmap Heap Scan on t1
2568 Recheck Cond: (c1 < $1)
2569 -> Bitmap Index Scan on t1_i1
2570 Index Cond: (c1 < $1)
2573 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2575 ----------------------------------
2576 Bitmap Heap Scan on t1
2577 Recheck Cond: (c1 < $1)
2578 -> Bitmap Index Scan on t1_i1
2579 Index Cond: (c1 < $1)
2582 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2584 ----------------------------------
2585 Bitmap Heap Scan on t1
2586 Recheck Cond: (c1 < $1)
2587 -> Bitmap Index Scan on t1_i1
2588 Index Cond: (c1 < $1)
2591 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2592 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2601 ----------------------------------
2602 Bitmap Heap Scan on t1
2603 Recheck Cond: (c1 < $1)
2604 -> Bitmap Index Scan on t1_i1
2605 Index Cond: (c1 < $1)
2611 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2613 EXPLAIN (COSTS false) EXECUTE p1;
2615 ------------------------------
2616 Index Scan using t1_i1 on t1
2617 Index Cond: (c1 = 1)
2620 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2622 EXPLAIN (COSTS false) EXECUTE p1;
2624 ------------------------------
2625 Index Scan using t1_i1 on t1
2626 Index Cond: (c1 = 1)
2630 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2632 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2634 ---------------------
2639 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2641 ---------------------
2646 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2648 ---------------------
2653 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2655 ---------------------
2660 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2662 ---------------------
2667 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2669 ---------------------
2674 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2676 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2678 ---------------------
2687 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2696 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2698 --------------------
2703 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2705 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2714 --------------------
2721 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2730 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2732 ----------------------------------
2733 Bitmap Heap Scan on t1
2734 Recheck Cond: (c1 < $1)
2735 -> Bitmap Index Scan on t1_i1
2736 Index Cond: (c1 < $1)
2740 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2742 ----------------------------------
2743 Bitmap Heap Scan on t1
2744 Recheck Cond: (c1 < $1)
2745 -> Bitmap Index Scan on t1_i1
2746 Index Cond: (c1 < $1)
2750 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2752 ----------------------------------
2753 Bitmap Heap Scan on t1
2754 Recheck Cond: (c1 < $1)
2755 -> Bitmap Index Scan on t1_i1
2756 Index Cond: (c1 < $1)
2760 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2762 ----------------------------------
2763 Bitmap Heap Scan on t1
2764 Recheck Cond: (c1 < $1)
2765 -> Bitmap Index Scan on t1_i1
2766 Index Cond: (c1 < $1)
2770 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2772 ----------------------------------
2773 Bitmap Heap Scan on t1
2774 Recheck Cond: (c1 < $1)
2775 -> Bitmap Index Scan on t1_i1
2776 Index Cond: (c1 < $1)
2780 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2782 ----------------------------------
2783 Bitmap Heap Scan on t1
2784 Recheck Cond: (c1 < $1)
2785 -> Bitmap Index Scan on t1_i1
2786 Index Cond: (c1 < $1)
2789 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2791 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2800 ----------------------------------
2801 Bitmap Heap Scan on t1
2802 Recheck Cond: (c1 < $1)
2803 -> Bitmap Index Scan on t1_i1
2804 Index Cond: (c1 < $1)
2811 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2819 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2821 --------------------
2826 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2827 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2836 --------------------
2843 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2851 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2853 ----------------------------------
2854 Bitmap Heap Scan on t1
2855 Recheck Cond: (c1 < $1)
2856 -> Bitmap Index Scan on t1_i1
2857 Index Cond: (c1 < $1)
2860 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2862 ----------------------------------
2863 Bitmap Heap Scan on t1
2864 Recheck Cond: (c1 < $1)
2865 -> Bitmap Index Scan on t1_i1
2866 Index Cond: (c1 < $1)
2869 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2871 ----------------------------------
2872 Bitmap Heap Scan on t1
2873 Recheck Cond: (c1 < $1)
2874 -> Bitmap Index Scan on t1_i1
2875 Index Cond: (c1 < $1)
2878 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2880 ----------------------------------
2881 Bitmap Heap Scan on t1
2882 Recheck Cond: (c1 < $1)
2883 -> Bitmap Index Scan on t1_i1
2884 Index Cond: (c1 < $1)
2887 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2889 ----------------------------------
2890 Bitmap Heap Scan on t1
2891 Recheck Cond: (c1 < $1)
2892 -> Bitmap Index Scan on t1_i1
2893 Index Cond: (c1 < $1)
2896 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2898 ----------------------------------
2899 Bitmap Heap Scan on t1
2900 Recheck Cond: (c1 < $1)
2901 -> Bitmap Index Scan on t1_i1
2902 Index Cond: (c1 < $1)
2905 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2906 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2915 ----------------------------------
2916 Bitmap Heap Scan on t1
2917 Recheck Cond: (c1 < $1)
2918 -> Bitmap Index Scan on t1_i1
2919 Index Cond: (c1 < $1)
2925 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2927 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2929 ------------------------------
2930 Index Scan using t1_i1 on t1
2931 Index Cond: (c1 = 1)
2934 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2936 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2938 ------------------------------
2939 Index Scan using t1_i1 on t1
2940 Index Cond: (c1 = 1)
2944 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2946 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2948 ---------------------
2954 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2956 ---------------------
2962 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2964 ---------------------
2970 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2972 ---------------------
2978 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2980 ---------------------
2986 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2988 ---------------------
2993 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2995 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2997 ---------------------
3004 ---- No. A-10-4 EXECUTE statement name error
3008 ERROR: prepared statement "p1" does not exist
3009 SHOW pg_hint_plan.debug_print;
3010 pg_hint_plan.debug_print
3011 --------------------------
3016 ---- No. A-11-5 EXECUTE statement name error
3019 SELECT pg_stat_statements_reset();
3020 pg_stat_statements_reset
3021 --------------------------
3025 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3031 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3034 Set(enable_seqscan off)
3044 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3057 SELECT s.query, s.calls
3058 FROM public.pg_stat_statements s
3059 JOIN pg_catalog.pg_database d
3063 -------------------------------------------------------------------+-------
3064 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3065 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3066 SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3067 SELECT pg_stat_statements_reset(); | 1
3071 ---- No. A-12-1 reset of global variable of core at the error
3072 ---- No. A-12-2 reset of global variable of original at the error
3074 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3076 ------------------------------------
3078 Merge Cond: (t1.c1 = t2.c1)
3079 -> Index Scan using t1_i1 on t1
3085 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3086 PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3087 INFO: hint syntax error at or near "NestLoop(t1 t1)"
3088 DETAIL: Relation name "t1" is duplicated.
3093 Set(enable_seqscan off)
3094 Set(geqo_threshold 100)
3100 EXPLAIN (COSTS false) EXECUTE p1;
3102 ------------------------------------
3104 Merge Cond: (t1.c1 = t2.c1)
3108 -> Index Scan using t2_i1 on t2
3113 SELECT name, setting FROM settings;
3115 ---------------------------+-----------
3118 geqo_generations | 0
3121 geqo_selection_bias | 2
3123 constraint_exclusion | partition
3124 cursor_tuple_fraction | 0.1
3125 default_statistics_target | 100
3126 from_collapse_limit | 8
3127 join_collapse_limit | 8
3128 cpu_index_tuple_cost | 0.005
3129 cpu_operator_cost | 0.0025
3130 cpu_tuple_cost | 0.01
3131 effective_cache_size | 16384
3132 random_page_cost | 4
3134 enable_bitmapscan | on
3136 enable_hashjoin | on
3137 enable_indexscan | on
3138 enable_material | on
3139 enable_mergejoin | on
3140 enable_nestloop | on
3144 client_min_messages | log
3147 SET pg_hint_plan.parse_messages TO error;
3148 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3149 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3150 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3151 DETAIL: Relation name "t1" is duplicated.
3152 SELECT name, setting FROM settings;
3154 ---------------------------+-----------
3157 geqo_generations | 0
3160 geqo_selection_bias | 2
3162 constraint_exclusion | partition
3163 cursor_tuple_fraction | 0.1
3164 default_statistics_target | 100
3165 from_collapse_limit | 8
3166 join_collapse_limit | 8
3167 cpu_index_tuple_cost | 0.005
3168 cpu_operator_cost | 0.0025
3169 cpu_tuple_cost | 0.01
3170 effective_cache_size | 16384
3171 random_page_cost | 4
3173 enable_bitmapscan | on
3175 enable_hashjoin | on
3176 enable_indexscan | on
3177 enable_material | on
3178 enable_mergejoin | on
3179 enable_nestloop | on
3183 client_min_messages | log
3186 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3187 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3192 Set(enable_seqscan off)
3193 Set(geqo_threshold 100)
3199 ------------------------------------
3201 Merge Cond: (t1.c1 = t2.c1)
3205 -> Index Scan using t2_i1 on t2
3210 SELECT name, setting FROM settings;
3212 ---------------------------+-----------
3215 geqo_generations | 0
3218 geqo_selection_bias | 2
3220 constraint_exclusion | partition
3221 cursor_tuple_fraction | 0.1
3222 default_statistics_target | 100
3223 from_collapse_limit | 8
3224 join_collapse_limit | 8
3225 cpu_index_tuple_cost | 0.005
3226 cpu_operator_cost | 0.0025
3227 cpu_tuple_cost | 0.01
3228 effective_cache_size | 16384
3229 random_page_cost | 4
3231 enable_bitmapscan | on
3233 enable_hashjoin | on
3234 enable_indexscan | on
3235 enable_material | on
3236 enable_mergejoin | on
3237 enable_nestloop | on
3241 client_min_messages | log
3244 SET pg_hint_plan.parse_messages TO error;
3245 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3246 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3247 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3248 DETAIL: Relation name "t1" is duplicated.
3249 SELECT name, setting FROM settings;
3251 ---------------------------+-----------
3254 geqo_generations | 0
3257 geqo_selection_bias | 2
3259 constraint_exclusion | partition
3260 cursor_tuple_fraction | 0.1
3261 default_statistics_target | 100
3262 from_collapse_limit | 8
3263 join_collapse_limit | 8
3264 cpu_index_tuple_cost | 0.005
3265 cpu_operator_cost | 0.0025
3266 cpu_tuple_cost | 0.01
3267 effective_cache_size | 16384
3268 random_page_cost | 4
3270 enable_bitmapscan | on
3272 enable_hashjoin | on
3273 enable_indexscan | on
3274 enable_material | on
3275 enable_mergejoin | on
3276 enable_nestloop | on
3280 client_min_messages | log
3283 EXPLAIN (COSTS false) EXECUTE p1;
3285 ------------------------------------
3287 Merge Cond: (t1.c1 = t2.c1)
3291 -> Index Scan using t2_i1 on t2
3296 SELECT name, setting FROM settings;
3298 ---------------------------+-----------
3301 geqo_generations | 0
3304 geqo_selection_bias | 2
3306 constraint_exclusion | partition
3307 cursor_tuple_fraction | 0.1
3308 default_statistics_target | 100
3309 from_collapse_limit | 8
3310 join_collapse_limit | 8
3311 cpu_index_tuple_cost | 0.005
3312 cpu_operator_cost | 0.0025
3313 cpu_tuple_cost | 0.01
3314 effective_cache_size | 16384
3315 random_page_cost | 4
3317 enable_bitmapscan | on
3319 enable_hashjoin | on
3320 enable_indexscan | on
3321 enable_material | on
3322 enable_mergejoin | on
3323 enable_nestloop | on
3327 client_min_messages | log
3330 SET pg_hint_plan.parse_messages TO error;
3331 EXPLAIN (COSTS false) EXECUTE p2;
3332 ERROR: prepared statement "p2" does not exist
3333 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3334 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3339 Set(enable_seqscan off)
3340 Set(geqo_threshold 100)
3346 ------------------------------------
3348 Merge Cond: (t1.c1 = t2.c1)
3352 -> Index Scan using t2_i1 on t2
3355 EXPLAIN (COSTS false) EXECUTE p1;
3357 ------------------------------------
3359 Merge Cond: (t1.c1 = t2.c1)
3363 -> Index Scan using t2_i1 on t2
3366 SELECT name, setting FROM settings;
3368 ---------------------------+-----------
3371 geqo_generations | 0
3374 geqo_selection_bias | 2
3376 constraint_exclusion | partition
3377 cursor_tuple_fraction | 0.1
3378 default_statistics_target | 100
3379 from_collapse_limit | 8
3380 join_collapse_limit | 8
3381 cpu_index_tuple_cost | 0.005
3382 cpu_operator_cost | 0.0025
3383 cpu_tuple_cost | 0.01
3384 effective_cache_size | 16384
3385 random_page_cost | 4
3387 enable_bitmapscan | on
3389 enable_hashjoin | on
3390 enable_indexscan | on
3391 enable_material | on
3392 enable_mergejoin | on
3393 enable_nestloop | on
3397 client_min_messages | log
3402 SELECT name, setting FROM settings;
3404 ---------------------------+-----------
3407 geqo_generations | 0
3410 geqo_selection_bias | 2
3412 constraint_exclusion | partition
3413 cursor_tuple_fraction | 0.1
3414 default_statistics_target | 100
3415 from_collapse_limit | 8
3416 join_collapse_limit | 8
3417 cpu_index_tuple_cost | 0.005
3418 cpu_operator_cost | 0.0025
3419 cpu_tuple_cost | 0.01
3420 effective_cache_size | 16384
3421 random_page_cost | 4
3423 enable_bitmapscan | on
3425 enable_hashjoin | on
3426 enable_indexscan | on
3427 enable_material | on
3428 enable_mergejoin | on
3429 enable_nestloop | on
3433 client_min_messages | log
3436 SET pg_hint_plan.parse_messages TO error;
3437 EXPLAIN (COSTS false) EXECUTE p2;
3438 ERROR: prepared statement "p2" does not exist
3439 EXPLAIN (COSTS false) EXECUTE p1;
3441 ------------------------------------
3443 Merge Cond: (t1.c1 = t2.c1)
3447 -> Index Scan using t2_i1 on t2
3450 SELECT name, setting FROM settings;
3452 ---------------------------+-----------
3455 geqo_generations | 0
3458 geqo_selection_bias | 2
3460 constraint_exclusion | partition
3461 cursor_tuple_fraction | 0.1
3462 default_statistics_target | 100
3463 from_collapse_limit | 8
3464 join_collapse_limit | 8
3465 cpu_index_tuple_cost | 0.005
3466 cpu_operator_cost | 0.0025
3467 cpu_tuple_cost | 0.01
3468 effective_cache_size | 16384
3469 random_page_cost | 4
3471 enable_bitmapscan | on
3473 enable_hashjoin | on
3474 enable_indexscan | on
3475 enable_material | on
3476 enable_mergejoin | on
3477 enable_nestloop | on
3481 client_min_messages | log
3485 SET pg_hint_plan.parse_messages TO LOG;
3487 ---- No. A-12-3 effective range of the hint
3489 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3491 ------------------------------------
3493 Merge Cond: (t1.c1 = t2.c1)
3494 -> Index Scan using t1_i1 on t1
3501 SET enable_indexscan TO off;
3502 SET enable_mergejoin TO off;
3503 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3505 ------------------------------
3507 Hash Cond: (t1.c1 = t2.c1)
3513 SELECT name, setting FROM settings;
3515 ---------------------------+-----------
3518 geqo_generations | 0
3521 geqo_selection_bias | 2
3523 constraint_exclusion | partition
3524 cursor_tuple_fraction | 0.1
3525 default_statistics_target | 100
3526 from_collapse_limit | 8
3527 join_collapse_limit | 8
3528 cpu_index_tuple_cost | 0.005
3529 cpu_operator_cost | 0.0025
3530 cpu_tuple_cost | 0.01
3531 effective_cache_size | 16384
3532 random_page_cost | 4
3534 enable_bitmapscan | on
3536 enable_hashjoin | on
3537 enable_indexscan | off
3538 enable_material | on
3539 enable_mergejoin | off
3540 enable_nestloop | on
3544 client_min_messages | log
3547 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3548 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3554 Set(enable_indexscan on)
3555 Set(geqo_threshold 100)
3561 ------------------------------------
3563 Merge Cond: (t1.c1 = t2.c1)
3564 -> Index Scan using t1_i1 on t1
3565 -> Index Scan using t2_i1 on t2
3568 SELECT name, setting FROM settings;
3570 ---------------------------+-----------
3573 geqo_generations | 0
3576 geqo_selection_bias | 2
3578 constraint_exclusion | partition
3579 cursor_tuple_fraction | 0.1
3580 default_statistics_target | 100
3581 from_collapse_limit | 8
3582 join_collapse_limit | 8
3583 cpu_index_tuple_cost | 0.005
3584 cpu_operator_cost | 0.0025
3585 cpu_tuple_cost | 0.01
3586 effective_cache_size | 16384
3587 random_page_cost | 4
3589 enable_bitmapscan | on
3591 enable_hashjoin | on
3592 enable_indexscan | off
3593 enable_material | on
3594 enable_mergejoin | off
3595 enable_nestloop | on
3599 client_min_messages | log
3602 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3604 ------------------------------
3606 Hash Cond: (t1.c1 = t2.c1)
3613 SET enable_indexscan TO off;
3614 SET enable_mergejoin TO off;
3615 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3617 ------------------------------
3619 Hash Cond: (t1.c1 = t2.c1)
3625 SELECT name, setting FROM settings;
3627 ---------------------------+-----------
3630 geqo_generations | 0
3633 geqo_selection_bias | 2
3635 constraint_exclusion | partition
3636 cursor_tuple_fraction | 0.1
3637 default_statistics_target | 100
3638 from_collapse_limit | 8
3639 join_collapse_limit | 8
3640 cpu_index_tuple_cost | 0.005
3641 cpu_operator_cost | 0.0025
3642 cpu_tuple_cost | 0.01
3643 effective_cache_size | 16384
3644 random_page_cost | 4
3646 enable_bitmapscan | on
3648 enable_hashjoin | on
3649 enable_indexscan | off
3650 enable_material | on
3651 enable_mergejoin | off
3652 enable_nestloop | on
3656 client_min_messages | log
3660 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3661 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3667 Set(enable_indexscan on)
3668 Set(geqo_threshold 100)
3674 ------------------------------------
3676 Merge Cond: (t1.c1 = t2.c1)
3677 -> Index Scan using t1_i1 on t1
3678 -> Index Scan using t2_i1 on t2
3683 SELECT name, setting FROM settings;
3685 ---------------------------+-----------
3688 geqo_generations | 0
3691 geqo_selection_bias | 2
3693 constraint_exclusion | partition
3694 cursor_tuple_fraction | 0.1
3695 default_statistics_target | 100
3696 from_collapse_limit | 8
3697 join_collapse_limit | 8
3698 cpu_index_tuple_cost | 0.005
3699 cpu_operator_cost | 0.0025
3700 cpu_tuple_cost | 0.01
3701 effective_cache_size | 16384
3702 random_page_cost | 4
3704 enable_bitmapscan | on
3706 enable_hashjoin | on
3707 enable_indexscan | off
3708 enable_material | on
3709 enable_mergejoin | off
3710 enable_nestloop | on
3714 client_min_messages | log
3717 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3719 ------------------------------
3721 Hash Cond: (t1.c1 = t2.c1)
3729 SET enable_indexscan TO off;
3730 SET enable_mergejoin TO off;
3731 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3733 ------------------------------
3735 Hash Cond: (t1.c1 = t2.c1)
3741 SELECT name, setting FROM settings;
3743 ---------------------------+-----------
3746 geqo_generations | 0
3749 geqo_selection_bias | 2
3751 constraint_exclusion | partition
3752 cursor_tuple_fraction | 0.1
3753 default_statistics_target | 100
3754 from_collapse_limit | 8
3755 join_collapse_limit | 8
3756 cpu_index_tuple_cost | 0.005
3757 cpu_operator_cost | 0.0025
3758 cpu_tuple_cost | 0.01
3759 effective_cache_size | 16384
3760 random_page_cost | 4
3762 enable_bitmapscan | on
3764 enable_hashjoin | on
3765 enable_indexscan | off
3766 enable_material | on
3767 enable_mergejoin | off
3768 enable_nestloop | on
3772 client_min_messages | log
3775 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3776 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3782 Set(enable_indexscan on)
3783 Set(geqo_threshold 100)
3789 ------------------------------------
3791 Merge Cond: (t1.c1 = t2.c1)
3792 -> Index Scan using t1_i1 on t1
3793 -> Index Scan using t2_i1 on t2
3797 SET enable_indexscan TO off;
3798 SET enable_mergejoin TO off;
3799 LOAD 'pg_hint_plan';
3800 SELECT name, setting FROM settings;
3802 ---------------------------+-----------
3805 geqo_generations | 0
3808 geqo_selection_bias | 2
3810 constraint_exclusion | partition
3811 cursor_tuple_fraction | 0.1
3812 default_statistics_target | 100
3813 from_collapse_limit | 8
3814 join_collapse_limit | 8
3815 cpu_index_tuple_cost | 0.005
3816 cpu_operator_cost | 0.0025
3817 cpu_tuple_cost | 0.01
3818 effective_cache_size | 16384
3819 random_page_cost | 4
3821 enable_bitmapscan | on
3823 enable_hashjoin | on
3824 enable_indexscan | off
3825 enable_material | on
3826 enable_mergejoin | off
3827 enable_nestloop | on
3831 client_min_messages | notice
3834 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3836 ------------------------------
3838 Hash Cond: (t1.c1 = t2.c1)
3844 SET pg_hint_plan.enable_hint TO on;
3845 SET pg_hint_plan.debug_print TO on;
3846 SET client_min_messages TO LOG;
3847 SET search_path TO public;
3848 RESET enable_indexscan;
3849 RESET enable_mergejoin;
3851 ---- No. A-13 call planner recursively
3853 CREATE OR REPLACE FUNCTION nested_planner(cnt int) RETURNS int AS $$
3857 RAISE NOTICE 'nested_planner(%)', cnt;
3864 EXECUTE '/*+ IndexScan(t_1) */'
3865 ' SELECT nested_planner($1) FROM s1.t1 t_1'
3866 ' JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)'
3867 ' ORDER BY t_1.c1 LIMIT 1'
3868 INTO new_cnt USING cnt - 1;
3872 $$ LANGUAGE plpgsql IMMUTABLE;
3874 ---- No. A-13-2 use hint of main query
3877 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3878 NOTICE: nested_planner(1)
3880 ----------------------------------
3881 Index Scan using t1_i1 on t1 t_1
3885 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3886 NOTICE: nested_planner(1)
3895 --------------------------
3898 -> Seq Scan on t1 t_1
3902 ---- No. A-13-3 output number of times of debugging log
3905 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3906 NOTICE: nested_planner(1)
3908 ----------------------------------
3909 Index Scan using t1_i1 on t1 t_1
3913 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
3914 NOTICE: nested_planner(1)
3923 ----------------------------------
3924 Index Scan using t1_i1 on t1 t_1
3928 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
3929 NOTICE: nested_planner(2)
3930 NOTICE: nested_planner(1)
3931 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"
3932 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3934 ----------------------------------
3935 Index Scan using t1_i1 on t1 t_1
3939 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
3940 NOTICE: nested_planner(2)
3941 NOTICE: nested_planner(1)
3942 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"
3943 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3951 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"
3952 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3961 ----------------------------------
3962 Index Scan using t1_i1 on t1 t_1
3966 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
3967 NOTICE: nested_planner(5)
3968 NOTICE: nested_planner(4)
3969 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"
3970 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3971 NOTICE: nested_planner(3)
3972 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"
3973 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3974 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"
3975 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3976 NOTICE: nested_planner(2)
3977 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"
3978 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3979 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"
3980 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3981 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"
3982 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3983 NOTICE: nested_planner(1)
3984 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"
3985 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3986 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"
3987 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3988 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"
3989 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3990 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"
3991 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
3993 ----------------------------------
3994 Index Scan using t1_i1 on t1 t_1
3998 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
3999 NOTICE: nested_planner(5)
4000 NOTICE: nested_planner(4)
4001 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"
4002 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4003 NOTICE: nested_planner(3)
4004 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"
4005 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4006 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"
4007 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4008 NOTICE: nested_planner(2)
4009 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"
4010 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4011 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"
4012 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4013 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"
4014 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4015 NOTICE: nested_planner(1)
4016 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"
4017 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4018 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"
4019 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4020 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"
4021 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4022 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"
4023 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4031 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"
4032 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4033 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"
4034 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4035 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"
4036 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4037 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"
4038 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4046 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"
4047 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4048 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"
4049 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4050 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"
4051 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4059 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"
4060 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4061 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"
4062 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4070 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"
4071 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4080 ----------------------------------
4081 Index Scan using t1_i1 on t1 t_1
4085 ---- No. A-13-4 output of debugging log on hint status
4088 /*+HashJoin(t_1 t_2)*/
4089 EXPLAIN (COSTS false)
4090 SELECT nested_planner(2) FROM s1.t1 t_1
4091 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4093 NOTICE: nested_planner(2)
4094 NOTICE: nested_planner(1)
4095 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"
4096 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4104 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"
4105 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4114 --------------------------------------
4118 Hash Cond: (t_1.c1 = t_2.c1)
4119 -> Seq Scan on t1 t_1
4121 -> Seq Scan on t2 t_2
4125 /*+HashJoin(st_1 st_2)*/
4126 EXPLAIN (COSTS false)
4127 SELECT nested_planner(2) FROM s1.t1 st_1
4128 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4130 NOTICE: nested_planner(2)
4131 NOTICE: nested_planner(1)
4132 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"
4133 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4141 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"
4142 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4151 ----------------------------------------
4155 Hash Cond: (st_1.c1 = st_2.c1)
4156 -> Seq Scan on t1 st_1
4158 -> Seq Scan on t2 st_2
4162 /*+HashJoin(t_1 t_2)*/
4163 EXPLAIN (COSTS false)
4164 SELECT nested_planner(2) FROM s1.t1 st_1
4165 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4167 NOTICE: nested_planner(2)
4168 NOTICE: nested_planner(1)
4169 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"
4170 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4178 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"
4179 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4188 -----------------------------------------
4190 Merge Cond: (st_1.c1 = st_2.c1)
4191 -> Index Scan using t1_i1 on t1 st_1
4194 -> Seq Scan on t2 st_2
4198 /*+HashJoin(st_1 st_2)*/
4199 EXPLAIN (COSTS false)
4200 SELECT nested_planner(2) FROM s1.t1 t_1
4201 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4203 NOTICE: nested_planner(2)
4204 NOTICE: nested_planner(1)
4205 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"
4206 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4214 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"
4215 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4224 ----------------------------------------
4226 Merge Cond: (t_1.c1 = t_2.c1)
4227 -> Index Scan using t1_i1 on t1 t_1
4230 -> Seq Scan on t2 t_2
4234 /*+HashJoin(t_1 t_1)*/
4235 EXPLAIN (COSTS false)
4236 SELECT nested_planner(2) FROM s1.t1 t_1
4238 NOTICE: nested_planner(2)
4239 NOTICE: nested_planner(1)
4240 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"
4241 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4242 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4243 DETAIL: Relation name "t_1" is duplicated.
4244 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"
4245 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4253 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"
4254 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4263 ----------------------------------
4264 Index Scan using t1_i1 on t1 t_1
4268 CREATE OR REPLACE FUNCTION nested_planner_one_t(cnt int) RETURNS int AS $$
4272 RAISE NOTICE 'nested_planner_one_t(%)', cnt;
4278 EXECUTE '/*+ IndexScan(t_1) */'
4279 ' SELECT nested_planner_one_t($1) FROM s1.t1 t_1'
4280 ' ORDER BY t_1.c1 LIMIT 1'
4281 INTO new_cnt USING cnt - 1;
4285 $$ LANGUAGE plpgsql IMMUTABLE;
4286 EXPLAIN (COSTS false)
4287 SELECT nested_planner_one_t(2) FROM s1.t1 t_1
4288 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4290 NOTICE: nested_planner_one_t(2)
4291 NOTICE: nested_planner_one_t(1)
4292 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4293 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4295 ----------------------------------------
4297 Merge Cond: (t_1.c1 = t_2.c1)
4298 -> Index Scan using t1_i1 on t1 t_1
4301 -> Seq Scan on t2 t_2
4304 /*+HashJoin(t_1 t_1)*/
4305 EXPLAIN (COSTS false)
4306 SELECT nested_planner_one_t(2) FROM s1.t1 t_1
4307 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4309 NOTICE: nested_planner_one_t(2)
4310 NOTICE: nested_planner_one_t(1)
4311 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4312 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4320 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4321 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4322 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4323 DETAIL: Relation name "t_1" is duplicated.
4332 ----------------------------------------
4334 Merge Cond: (t_1.c1 = t_2.c1)
4335 -> Index Scan using t1_i1 on t1 t_1
4338 -> Seq Scan on t2 t_2
4341 DROP FUNCTION nested_planner_one_t(int);
4343 /*+HashJoin(t_1 t_1)*/
4344 EXPLAIN (COSTS false)
4345 SELECT nested_planner(2) FROM s1.t1 t_1
4346 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4348 NOTICE: nested_planner(2)
4349 NOTICE: nested_planner(1)
4350 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"
4351 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4352 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4353 DETAIL: Relation name "t_1" is duplicated.
4354 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"
4355 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4363 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"
4364 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4365 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4366 DETAIL: Relation name "t_1" is duplicated.
4375 ----------------------------------------
4377 Merge Cond: (t_1.c1 = t_2.c1)
4378 -> Index Scan using t1_i1 on t1 t_1
4381 -> Seq Scan on t2 t_2
4385 /*+MergeJoin(t_1 t_2)HashJoin(t_1 t_2)*/
4386 EXPLAIN (COSTS false)
4387 SELECT nested_planner(2) FROM s1.t1 t_1
4388 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4390 INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4391 DETAIL: Conflict join method hint.
4392 NOTICE: nested_planner(2)
4393 INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4394 DETAIL: Conflict join method hint.
4395 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"
4396 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4397 NOTICE: nested_planner(1)
4398 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"
4399 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4408 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"
4409 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4419 --------------------------------------
4423 Hash Cond: (t_1.c1 = t_2.c1)
4424 -> Seq Scan on t1 t_1
4426 -> Seq Scan on t2 t_2