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;
7 ---- No. A-5-1 hint format
11 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
27 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
29 ------------------------------
30 Index Scan using t1_i1 on t1
36 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
38 ------------------------------
39 Index Scan using t1_i1 on t1
45 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
47 ------------------------------
48 Index Scan using t1_i1 on t1
54 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
56 ------------------------------
57 Index Scan using t1_i1 on t1
63 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
65 ------------------------------
66 Index Scan using t1_i1 on t1
71 /*+SeqScan(t1) /* nest comment */ */
72 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
73 INFO: hint syntax error at or near "/* nest comment */ */
74 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
75 DETAIL: Nested block comments are not supported.
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;
86 ------------------------------
87 Index Scan using t1_i1 on t1
92 /*SeqScan(t1) /* nest comment */ */
93 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
95 ------------------------------
96 Index Scan using t1_i1 on t1
101 ---- No. A-5-2 hint position
105 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
122 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
124 ------------------------------
125 Index Scan using t1_i1 on t1
130 EXPLAIN (COSTS false) SELECT /*+SeqScan(t1)*/ * FROM s1.t1 WHERE t1.c1 = 1;
132 ------------------------------
133 Index Scan using t1_i1 on t1
138 ---- No. A-5-4 hint delimiter
140 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
142 ------------------------------
143 Index Scan using t1_i1 on t1
154 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
155 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
158 Set(enable_bitmapscan off)
159 Set(enable_indexscan off)
171 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
172 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
175 Set(enable_bitmapscan off)
176 Set(enable_indexscan off)
188 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
189 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
192 Set(enable_bitmapscan off)
193 Set(enable_indexscan off)
205 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
206 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
209 Set(enable_bitmapscan off)
210 Set(enable_indexscan off)
222 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
223 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
226 Set(enable_bitmapscan off)
227 Set(enable_indexscan off)
239 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
240 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
243 Set(enable_bitmapscan off)
244 Set(enable_indexscan off)
256 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
257 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
260 Set(enable_bitmapscan off)
261 Set(enable_indexscan off)
273 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
274 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
277 Set(enable_bitmapscan off)
278 Set(enable_indexscan off)
290 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
291 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
294 Set(enable_bitmapscan off)
295 Set(enable_indexscan off)
307 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
308 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
311 Set(enable_bitmapscan off)
312 Set(enable_indexscan off)
324 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
325 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
328 Set(enable_bitmapscan off)
329 Set(enable_indexscan off)
341 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
342 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
345 Set(enable_bitmapscan off)
346 Set(enable_indexscan off)
358 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
359 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
362 Set(enable_bitmapscan off)
363 Set(enable_indexscan off)
375 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
376 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
379 Set(enable_bitmapscan off)
380 Set(enable_indexscan off)
392 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
393 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
396 Set(enable_bitmapscan off)
397 Set(enable_indexscan off)
410 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
411 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
414 Set(enable_bitmapscan off)
415 Set(enable_indexscan off)
427 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
429 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
432 Set(enable_bitmapscan off)
433 Set(enable_indexscan off)
447 (enable_indexscan"off")
449 (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)
468 enable_indexscan"off")Set
470 enable_bitmapscan"off")*/
471 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
474 Set(enable_bitmapscan off)
475 Set(enable_indexscan off)
487 /*+Set(enable_indexscan"off"
489 Set(enable_bitmapscan"off"
492 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
495 Set(enable_bitmapscan off)
496 Set(enable_indexscan off)
515 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
518 Set(enable_bitmapscan off)
519 Set(enable_indexscan off)
543 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
546 Set(enable_bitmapscan off)
547 Set(enable_indexscan off)
560 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
561 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
564 Set(enable_bitmapscan off)
565 Set(enable_indexscan off)
577 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
579 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
582 Set(enable_bitmapscan off)
583 Set(enable_indexscan off)
597 (enable_indexscan"off")
599 (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)
618 enable_indexscan"off")Set
620 enable_bitmapscan"off")*/
621 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
624 Set(enable_bitmapscan off)
625 Set(enable_indexscan off)
637 /*+Set(enable_indexscan"off"
639 Set(enable_bitmapscan"off"
642 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
645 Set(enable_bitmapscan off)
646 Set(enable_indexscan off)
665 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
668 Set(enable_bitmapscan off)
669 Set(enable_indexscan off)
693 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
696 Set(enable_bitmapscan off)
697 Set(enable_indexscan off)
709 ---- No. A-5-5 hint object pattern
710 ---- No. A-7-2 message object pattern
715 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
730 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
745 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
760 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
777 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
792 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
801 ----------------------
807 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
822 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
831 ----------------------
839 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
854 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
863 ----------------------
869 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
884 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
893 ----------------------
901 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
902 INFO: hint syntax error at or near ")"
903 DETAIL: SeqScan hint requires a relation.
904 INFO: hint syntax error at or near ")"
905 DETAIL: Unrecognized hint keyword ")".
914 ----------------------------------
915 Index Scan using t1_i1 on t1 ")"
920 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
935 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")))" WHERE ")))".c1 = 1;
944 ----------------------
952 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
953 INFO: hint syntax error at or near ""
954 DETAIL: Unterminated quoted string.
956 -----------------------------------
957 Index Scan using t1_i1 on t1 """"
962 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
971 ---------------------
976 /*+SeqScan("""""""")*/
977 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """""""" WHERE """""""".c1 = 1;
986 -------------------------
987 Seq Scan on t1 """"""""
994 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
995 INFO: hint syntax error at or near ""
996 DETAIL: SeqScan hint requires a relation.
1005 ----------------------------------
1006 Index Scan using t1_i1 on t1 " "
1007 Index Cond: (c1 = 1)
1011 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1020 --------------------
1026 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1035 ----------------------
1043 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1044 INFO: hint syntax error at or near ""
1045 DETAIL: SeqScan hint requires a relation.
1054 -----------------------------------
1055 Index Scan using t1_i1 on t1 " "
1056 Index Cond: (c1 = 1)
1060 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1069 ---------------------------
1075 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1084 -------------------------------------------
1093 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1096 INFO: hint syntax error at or near ""
1097 DETAIL: SeqScan hint requires a relation.
1106 --------------------------------
1107 Index Scan using t1_i1 on t1 "
1109 Index Cond: (c1 = 1)
1114 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1126 --------------------
1136 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1154 --------------------
1165 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1174 ----------------------
1175 Seq Scan on t1 "Set"
1180 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1189 ----------------------
1190 Seq Scan on t1 "Set"
1194 /*+SeqScan("Set SeqScan Leading")*/
1195 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set SeqScan Leading" WHERE "Set SeqScan Leading".c1 = 1;
1198 SeqScan("Set SeqScan Leading")
1204 --------------------------------------
1205 Seq Scan on t1 "Set SeqScan Leading"
1212 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1221 ---------------------
1227 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1236 -------------------------
1237 Seq Scan on t1 "あいう"
1242 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1251 ---------------------
1257 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1266 -------------------------
1267 Seq Scan on t1 "あいう"
1274 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;
1275 INFO: hint syntax error at or near "/**/)*/
1276 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;"
1277 DETAIL: Nested block comments are not supported.
1279 -------------------------------------
1280 Index Scan using t1_i1 on t1 "/**/"
1281 Index Cond: (c1 = 1)
1284 /*+SeqScan(/**//**//**/)*/
1285 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;
1286 INFO: hint syntax error at or near "/**//**//**/)*/
1287 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;"
1288 DETAIL: Nested block comments are not supported.
1290 ---------------------------------------------
1291 Index Scan using t1_i1 on t1 "/**//**//**/"
1292 Index Cond: (c1 = 1)
1299 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1300 Set/**/あ" WHERE "tT()""
1302 INFO: hint syntax error at or near "/**/あ")*/
1303 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1304 Set/**/あ" WHERE "tT()""
1306 DETAIL: Nested block comments are not supported.
1308 ------------------------------------------
1309 Index Scan using t1_i1 on t1 "tT()""
1311 Index Cond: (c1 = 1)
1317 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1329 --------------------------
1330 Seq Scan on t1 "tT()""
1336 ---- No. A-5-6 hint parse error
1339 /*+Set(enable_indexscan off)Set enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1340 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1341 INFO: hint syntax error at or near "enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1342 DETAIL: Opening parenthesis is necessary.
1345 Set(enable_indexscan off)
1351 ----------------------------------
1352 Bitmap Heap Scan on t1
1353 Recheck Cond: (c1 = 1)
1354 -> Bitmap Index Scan on t1_i1
1355 Index Cond: (c1 = 1)
1359 /*+Set(enable_indexscan off)Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)*/
1360 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1361 INFO: hint syntax error at or near "Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)"
1362 DETAIL: Set hint requires name and value of GUC parameter.
1366 Set(enable_indexscan off)
1370 Set(enable_tidscan off Set(enable_bitmapscan off)
1373 --------------------
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 ""
1382 DETAIL: Unterminated quoted string.
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)SeqScan("")Set(enable_bitmapscan off)*/
1400 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1401 INFO: hint syntax error at or near ")Set(enable_bitmapscan off)"
1402 DETAIL: Zero-length delimited string.
1405 Set(enable_indexscan off)
1411 ----------------------------------
1412 Bitmap Heap Scan on t1
1413 Recheck Cond: (c1 = 1)
1414 -> Bitmap Index Scan on t1_i1
1415 Index Cond: (c1 = 1)
1419 /*+Set(enable_indexscan off)NoSet(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 "NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1422 DETAIL: Unrecognized hint keyword "NoSet".
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)"Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1440 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1441 INFO: hint syntax error at or near ""Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1442 DETAIL: Unrecognized hint keyword ""Set"".
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)Set(enable_tidscan /* value */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 "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1462 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
1463 DETAIL: Nested block comments are not supported.
1465 ------------------------------
1466 Index Scan using t1_i1 on t1
1467 Index Cond: (c1 = 1)
1471 ---- No. A-6-1 original GUC parameter
1474 SET ROLE super_user;
1475 SET pg_hint_plan.debug_print TO off;
1476 SHOW pg_hint_plan.enable_hint;
1477 pg_hint_plan.enable_hint
1478 --------------------------
1482 SHOW pg_hint_plan.debug_print;
1483 pg_hint_plan.debug_print
1484 --------------------------
1488 SHOW pg_hint_plan.parse_messages;
1489 pg_hint_plan.parse_messages
1490 -----------------------------
1494 SET pg_hint_plan.enable_hint TO off;
1495 SET pg_hint_plan.debug_print TO on;
1496 SET pg_hint_plan.parse_messages TO error;
1497 SHOW pg_hint_plan.enable_hint;
1498 pg_hint_plan.enable_hint
1499 --------------------------
1503 SHOW pg_hint_plan.debug_print;
1504 pg_hint_plan.debug_print
1505 --------------------------
1509 SHOW pg_hint_plan.parse_messages;
1510 pg_hint_plan.parse_messages
1511 -----------------------------
1515 RESET pg_hint_plan.enable_hint;
1516 RESET pg_hint_plan.debug_print;
1517 RESET pg_hint_plan.parse_messages;
1518 SHOW pg_hint_plan.enable_hint;
1519 pg_hint_plan.enable_hint
1520 --------------------------
1524 SHOW pg_hint_plan.debug_print;
1525 pg_hint_plan.debug_print
1526 --------------------------
1530 SHOW pg_hint_plan.parse_messages;
1531 pg_hint_plan.parse_messages
1532 -----------------------------
1537 SET ROLE normal_user;
1538 SHOW pg_hint_plan.enable_hint;
1539 pg_hint_plan.enable_hint
1540 --------------------------
1544 SHOW pg_hint_plan.debug_print;
1545 pg_hint_plan.debug_print
1546 --------------------------
1550 SHOW pg_hint_plan.parse_messages;
1551 pg_hint_plan.parse_messages
1552 -----------------------------
1556 SET pg_hint_plan.enable_hint TO off;
1557 SET pg_hint_plan.debug_print TO on;
1558 SET pg_hint_plan.parse_messages TO error;
1559 SHOW pg_hint_plan.enable_hint;
1560 pg_hint_plan.enable_hint
1561 --------------------------
1565 SHOW pg_hint_plan.debug_print;
1566 pg_hint_plan.debug_print
1567 --------------------------
1571 SHOW pg_hint_plan.parse_messages;
1572 pg_hint_plan.parse_messages
1573 -----------------------------
1577 RESET pg_hint_plan.enable_hint;
1578 RESET pg_hint_plan.debug_print;
1579 RESET pg_hint_plan.parse_messages;
1580 SHOW pg_hint_plan.enable_hint;
1581 pg_hint_plan.enable_hint
1582 --------------------------
1586 SHOW pg_hint_plan.debug_print;
1587 pg_hint_plan.debug_print
1588 --------------------------
1592 SHOW pg_hint_plan.parse_messages;
1593 pg_hint_plan.parse_messages
1594 -----------------------------
1600 ---- No. A-6-2 original GUC parameter pg_hint_plan.enable_hint
1603 SET pg_hint_plan.enable_hint TO on;
1604 SHOW pg_hint_plan.enable_hint;
1605 pg_hint_plan.enable_hint
1606 --------------------------
1610 /*+Set(enable_indexscan off)*/
1611 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1613 ----------------------------------
1614 Bitmap Heap Scan on t1
1615 Recheck Cond: (c1 = 1)
1616 -> Bitmap Index Scan on t1_i1
1617 Index Cond: (c1 = 1)
1621 SET pg_hint_plan.enable_hint TO off;
1622 SHOW pg_hint_plan.enable_hint;
1623 pg_hint_plan.enable_hint
1624 --------------------------
1628 /*+Set(enable_indexscan off)*/
1629 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1631 ------------------------------
1632 Index Scan using t1_i1 on t1
1633 Index Cond: (c1 = 1)
1637 SET pg_hint_plan.enable_hint TO DEFAULT;
1638 SHOW pg_hint_plan.enable_hint;
1639 pg_hint_plan.enable_hint
1640 --------------------------
1644 /*+Set(enable_indexscan off)*/
1645 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1647 ----------------------------------
1648 Bitmap Heap Scan on t1
1649 Recheck Cond: (c1 = 1)
1650 -> Bitmap Index Scan on t1_i1
1651 Index Cond: (c1 = 1)
1655 SET pg_hint_plan.enable_hint TO enable;
1656 ERROR: parameter "pg_hint_plan.enable_hint" requires a Boolean value
1657 SHOW pg_hint_plan.enable_hint;
1658 pg_hint_plan.enable_hint
1659 --------------------------
1664 ---- No. A-6-3 original GUC parameter pg_hint_plan.debug_print
1667 SET pg_hint_plan.debug_print TO on;
1668 SHOW pg_hint_plan.debug_print;
1669 pg_hint_plan.debug_print
1670 --------------------------
1674 /*+Set(enable_indexscan off)*/
1675 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1678 Set(enable_indexscan off)
1684 ----------------------------------
1685 Bitmap Heap Scan on t1
1686 Recheck Cond: (c1 = 1)
1687 -> Bitmap Index Scan on t1_i1
1688 Index Cond: (c1 = 1)
1692 SET pg_hint_plan.debug_print TO off;
1693 SHOW pg_hint_plan.debug_print;
1694 pg_hint_plan.debug_print
1695 --------------------------
1699 /*+Set(enable_indexscan off)*/
1700 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1702 ----------------------------------
1703 Bitmap Heap Scan on t1
1704 Recheck Cond: (c1 = 1)
1705 -> Bitmap Index Scan on t1_i1
1706 Index Cond: (c1 = 1)
1710 SET pg_hint_plan.debug_print TO DEFAULT;
1711 SHOW pg_hint_plan.debug_print;
1712 pg_hint_plan.debug_print
1713 --------------------------
1717 /*+Set(enable_indexscan off)*/
1718 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1720 ----------------------------------
1721 Bitmap Heap Scan on t1
1722 Recheck Cond: (c1 = 1)
1723 -> Bitmap Index Scan on t1_i1
1724 Index Cond: (c1 = 1)
1728 SET pg_hint_plan.debug_print TO enable;
1729 ERROR: parameter "pg_hint_plan.debug_print" requires a Boolean value
1730 SHOW pg_hint_plan.debug_print;
1731 pg_hint_plan.debug_print
1732 --------------------------
1737 ---- No. A-6-4 original GUC parameter pg_hint_plan.parse_messages
1739 SET client_min_messages TO debug5;
1740 DEBUG: CommitTransactionCommand
1741 DEBUG: CommitTransaction
1742 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1744 SET pg_hint_plan.parse_messages TO debug5;
1745 DEBUG: StartTransactionCommand
1746 DEBUG: StartTransaction
1747 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1748 DEBUG: ProcessUtility
1749 DEBUG: CommitTransactionCommand
1750 DEBUG: CommitTransaction
1751 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1752 SHOW pg_hint_plan.parse_messages;
1753 DEBUG: StartTransactionCommand
1754 DEBUG: StartTransaction
1755 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1756 DEBUG: ProcessUtility
1757 DEBUG: CommitTransactionCommand
1758 DEBUG: CommitTransaction
1759 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1760 pg_hint_plan.parse_messages
1761 -----------------------------
1766 DEBUG: StartTransactionCommand
1767 DEBUG: StartTransaction
1768 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1769 DEBUG: hint syntax error at or near ""
1770 DETAIL: Opening parenthesis is necessary.
1771 DEBUG: CommitTransactionCommand
1772 DEBUG: CommitTransaction
1773 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1779 SET client_min_messages TO debug4;
1780 DEBUG: StartTransactionCommand
1781 DEBUG: StartTransaction
1782 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1783 DEBUG: ProcessUtility
1784 DEBUG: CommitTransactionCommand
1785 DEBUG: CommitTransaction
1786 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1788 DEBUG: StartTransactionCommand
1789 DEBUG: StartTransaction
1790 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1791 DEBUG: CommitTransactionCommand
1792 DEBUG: CommitTransaction
1793 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1800 SET pg_hint_plan.parse_messages TO debug4;
1801 DEBUG: StartTransactionCommand
1802 DEBUG: StartTransaction
1803 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1804 DEBUG: ProcessUtility
1805 DEBUG: CommitTransactionCommand
1806 DEBUG: CommitTransaction
1807 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1808 SHOW pg_hint_plan.parse_messages;
1809 DEBUG: StartTransactionCommand
1810 DEBUG: StartTransaction
1811 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1812 DEBUG: ProcessUtility
1813 DEBUG: CommitTransactionCommand
1814 DEBUG: CommitTransaction
1815 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1816 pg_hint_plan.parse_messages
1817 -----------------------------
1822 DEBUG: StartTransactionCommand
1823 DEBUG: StartTransaction
1824 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1825 DEBUG: hint syntax error at or near ""
1826 DETAIL: Opening parenthesis is necessary.
1827 DEBUG: CommitTransactionCommand
1828 DEBUG: CommitTransaction
1829 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1835 SET client_min_messages TO debug3;
1836 DEBUG: StartTransactionCommand
1837 DEBUG: StartTransaction
1838 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1839 DEBUG: ProcessUtility
1840 DEBUG: CommitTransactionCommand
1841 DEBUG: CommitTransaction
1842 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1844 DEBUG: StartTransactionCommand
1845 DEBUG: StartTransaction
1846 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1847 DEBUG: CommitTransactionCommand
1848 DEBUG: CommitTransaction
1849 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1856 SET pg_hint_plan.parse_messages TO debug3;
1857 DEBUG: StartTransactionCommand
1858 DEBUG: StartTransaction
1859 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1860 DEBUG: ProcessUtility
1861 DEBUG: CommitTransactionCommand
1862 DEBUG: CommitTransaction
1863 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1864 SHOW pg_hint_plan.parse_messages;
1865 DEBUG: StartTransactionCommand
1866 DEBUG: StartTransaction
1867 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1868 DEBUG: ProcessUtility
1869 DEBUG: CommitTransactionCommand
1870 DEBUG: CommitTransaction
1871 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1872 pg_hint_plan.parse_messages
1873 -----------------------------
1878 DEBUG: StartTransactionCommand
1879 DEBUG: StartTransaction
1880 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1881 DEBUG: hint syntax error at or near ""
1882 DETAIL: Opening parenthesis is necessary.
1883 DEBUG: CommitTransactionCommand
1884 DEBUG: CommitTransaction
1885 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1891 SET client_min_messages TO debug2;
1892 DEBUG: StartTransactionCommand
1893 DEBUG: StartTransaction
1894 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1895 DEBUG: ProcessUtility
1903 SET pg_hint_plan.parse_messages TO debug2;
1904 SHOW pg_hint_plan.parse_messages;
1905 pg_hint_plan.parse_messages
1906 -----------------------------
1911 DEBUG: hint syntax error at or near ""
1912 DETAIL: Opening parenthesis is necessary.
1918 SET client_min_messages TO debug1;
1926 SET pg_hint_plan.parse_messages TO debug1;
1927 SHOW pg_hint_plan.parse_messages;
1928 pg_hint_plan.parse_messages
1929 -----------------------------
1934 DEBUG: hint syntax error at or near ""
1935 DETAIL: Opening parenthesis is necessary.
1941 SET client_min_messages TO log;
1949 SET pg_hint_plan.parse_messages TO log;
1950 SHOW pg_hint_plan.parse_messages;
1951 pg_hint_plan.parse_messages
1952 -----------------------------
1957 LOG: hint syntax error at or near ""
1958 DETAIL: Opening parenthesis is necessary.
1964 SET client_min_messages TO info;
1972 SET pg_hint_plan.parse_messages TO info;
1973 SHOW pg_hint_plan.parse_messages;
1974 pg_hint_plan.parse_messages
1975 -----------------------------
1980 INFO: hint syntax error at or near ""
1981 DETAIL: Opening parenthesis is necessary.
1987 SET client_min_messages TO notice;
1989 INFO: hint syntax error at or near ""
1990 DETAIL: Opening parenthesis is necessary.
1997 SET pg_hint_plan.parse_messages TO notice;
1998 SHOW pg_hint_plan.parse_messages;
1999 pg_hint_plan.parse_messages
2000 -----------------------------
2005 NOTICE: hint syntax error at or near ""
2006 DETAIL: Opening parenthesis is necessary.
2012 SET client_min_messages TO warning;
2020 SET pg_hint_plan.parse_messages TO warning;
2021 SHOW pg_hint_plan.parse_messages;
2022 pg_hint_plan.parse_messages
2023 -----------------------------
2028 WARNING: hint syntax error at or near ""
2029 DETAIL: Opening parenthesis is necessary.
2035 SET client_min_messages TO error;
2043 SET pg_hint_plan.parse_messages TO error;
2044 SHOW pg_hint_plan.parse_messages;
2045 pg_hint_plan.parse_messages
2046 -----------------------------
2051 ERROR: hint syntax error at or near ""
2052 DETAIL: Opening parenthesis is necessary.
2053 SET client_min_messages TO fatal;
2056 RESET client_min_messages;
2057 SET pg_hint_plan.parse_messages TO DEFAULT;
2058 SHOW pg_hint_plan.parse_messages;
2059 pg_hint_plan.parse_messages
2060 -----------------------------
2065 INFO: hint syntax error at or near ""
2066 DETAIL: Opening parenthesis is necessary.
2073 SET pg_hint_plan.parse_messages TO fatal;
2074 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "fatal"
2075 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2076 SHOW pg_hint_plan.parse_messages;
2077 pg_hint_plan.parse_messages
2078 -----------------------------
2083 SET pg_hint_plan.parse_messages TO panic;
2084 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "panic"
2085 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2086 SHOW pg_hint_plan.parse_messages;
2087 pg_hint_plan.parse_messages
2088 -----------------------------
2093 SET pg_hint_plan.parse_messages TO on;
2094 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "on"
2095 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2096 SHOW pg_hint_plan.parse_messages;
2097 pg_hint_plan.parse_messages
2098 -----------------------------
2103 ---- No. A-7-1 parse error message output
2106 /*+"Set"(enable_indexscan on)*/SELECT 1;
2107 INFO: hint syntax error at or near ""Set"(enable_indexscan on)"
2108 DETAIL: Unrecognized hint keyword ""Set"".
2114 /*+Set()(enable_indexscan on)*/SELECT 1;
2115 INFO: hint syntax error at or near "Set()(enable_indexscan on)"
2116 DETAIL: Set hint requires name and value of GUC parameter.
2117 INFO: hint syntax error at or near "(enable_indexscan on)"
2118 DETAIL: Unrecognized hint keyword "".
2124 /*+Set(enable_indexscan on*/SELECT 1;
2125 INFO: hint syntax error at or near ""
2126 DETAIL: Closing parenthesis is necessary.
2133 ---- No. A-7-3 hint state output
2135 SET pg_hint_plan.debug_print TO on;
2136 SET client_min_messages TO LOG;
2139 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2148 --------------------
2154 /*+SeqScan(no_table)*/
2155 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2164 ------------------------------
2165 Index Scan using t1_i1 on t1
2166 Index Cond: (c1 = 1)
2170 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2172 -----------------------------------
2174 TID Cond: (ctid = '(1,1)'::tid)
2178 /*+TidScan(t1)BitmapScan(t1)*/
2179 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2180 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)"
2181 DETAIL: Conflict scan method hint.
2191 ----------------------------------
2192 Bitmap Heap Scan on t1
2193 Recheck Cond: (c1 = 1)
2194 Filter: (ctid = '(1,1)'::tid)
2195 -> Bitmap Index Scan on t1_i1
2196 Index Cond: (c1 = 1)
2199 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)*/
2200 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2201 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)"
2202 DETAIL: Conflict scan method hint.
2203 INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)"
2204 DETAIL: Conflict scan method hint.
2215 ---------------------------------
2216 Index Scan using t1_i1 on t1
2217 Index Cond: (c1 = 1)
2218 Filter: (ctid = '(1,1)'::tid)
2221 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)*/
2222 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2223 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2224 DETAIL: Conflict scan method hint.
2225 INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2226 DETAIL: Conflict scan method hint.
2227 INFO: hint syntax error at or near "IndexScan(t1)SeqScan(t1)"
2228 DETAIL: Conflict scan method hint.
2240 ------------------------------------------------
2242 Filter: ((c1 = 1) AND (ctid = '(1,1)'::tid))
2246 /*+Set(enable_indexscan enable)*/
2247 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2248 INFO: parameter "enable_indexscan" requires a Boolean value
2254 Set(enable_indexscan enable)
2257 ------------------------------
2258 Index Scan using t1_i1 on t1
2259 Index Cond: (c1 = 1)
2263 ---- No. A-8-1 hint state output
2265 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2266 EXPLAIN (COSTS false) EXECUTE p1;
2268 ------------------------------
2269 Index Scan using t1_i1 on t1
2270 Index Cond: (c1 = 1)
2274 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2275 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2277 ---------------------
2282 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2284 ---------------------
2289 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2291 ---------------------
2296 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2298 ---------------------
2303 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2305 ---------------------
2310 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2312 ---------------------
2321 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2330 EXPLAIN (COSTS false) EXECUTE p1;
2332 --------------------
2337 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2339 EXPLAIN (COSTS false) EXECUTE p1;
2348 --------------------
2355 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2364 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2366 ----------------------------------
2367 Bitmap Heap Scan on t1
2368 Recheck Cond: (c1 < $1)
2369 -> Bitmap Index Scan on t1_i1
2370 Index Cond: (c1 < $1)
2374 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2376 ----------------------------------
2377 Bitmap Heap Scan on t1
2378 Recheck Cond: (c1 < $1)
2379 -> Bitmap Index Scan on t1_i1
2380 Index Cond: (c1 < $1)
2384 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2386 ----------------------------------
2387 Bitmap Heap Scan on t1
2388 Recheck Cond: (c1 < $1)
2389 -> Bitmap Index Scan on t1_i1
2390 Index Cond: (c1 < $1)
2394 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2396 ----------------------------------
2397 Bitmap Heap Scan on t1
2398 Recheck Cond: (c1 < $1)
2399 -> Bitmap Index Scan on t1_i1
2400 Index Cond: (c1 < $1)
2404 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2406 ----------------------------------
2407 Bitmap Heap Scan on t1
2408 Recheck Cond: (c1 < $1)
2409 -> Bitmap Index Scan on t1_i1
2410 Index Cond: (c1 < $1)
2414 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2416 ----------------------------------
2417 Bitmap Heap Scan on t1
2418 Recheck Cond: (c1 < $1)
2419 -> Bitmap Index Scan on t1_i1
2420 Index Cond: (c1 < $1)
2423 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2425 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2434 ----------------------------------
2435 Bitmap Heap Scan on t1
2436 Recheck Cond: (c1 < $1)
2437 -> Bitmap Index Scan on t1_i1
2438 Index Cond: (c1 < $1)
2445 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2453 EXPLAIN (COSTS false) EXECUTE p1;
2455 --------------------
2460 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2461 EXPLAIN (COSTS false) EXECUTE p1;
2470 --------------------
2477 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2485 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2487 ----------------------------------
2488 Bitmap Heap Scan on t1
2489 Recheck Cond: (c1 < $1)
2490 -> Bitmap Index Scan on t1_i1
2491 Index Cond: (c1 < $1)
2494 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2496 ----------------------------------
2497 Bitmap Heap Scan on t1
2498 Recheck Cond: (c1 < $1)
2499 -> Bitmap Index Scan on t1_i1
2500 Index Cond: (c1 < $1)
2503 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2505 ----------------------------------
2506 Bitmap Heap Scan on t1
2507 Recheck Cond: (c1 < $1)
2508 -> Bitmap Index Scan on t1_i1
2509 Index Cond: (c1 < $1)
2512 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2514 ----------------------------------
2515 Bitmap Heap Scan on t1
2516 Recheck Cond: (c1 < $1)
2517 -> Bitmap Index Scan on t1_i1
2518 Index Cond: (c1 < $1)
2521 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2523 ----------------------------------
2524 Bitmap Heap Scan on t1
2525 Recheck Cond: (c1 < $1)
2526 -> Bitmap Index Scan on t1_i1
2527 Index Cond: (c1 < $1)
2530 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2532 ----------------------------------
2533 Bitmap Heap Scan on t1
2534 Recheck Cond: (c1 < $1)
2535 -> Bitmap Index Scan on t1_i1
2536 Index Cond: (c1 < $1)
2539 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2540 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2549 ----------------------------------
2550 Bitmap Heap Scan on t1
2551 Recheck Cond: (c1 < $1)
2552 -> Bitmap Index Scan on t1_i1
2553 Index Cond: (c1 < $1)
2559 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2561 EXPLAIN (COSTS false) EXECUTE p1;
2563 ------------------------------
2564 Index Scan using t1_i1 on t1
2565 Index Cond: (c1 = 1)
2568 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2570 EXPLAIN (COSTS false) EXECUTE p1;
2572 ------------------------------
2573 Index Scan using t1_i1 on t1
2574 Index Cond: (c1 = 1)
2578 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2580 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2582 ---------------------
2587 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2589 ---------------------
2594 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2596 ---------------------
2601 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2603 ---------------------
2608 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2610 ---------------------
2615 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2617 ---------------------
2622 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2624 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2626 ---------------------
2635 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2644 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2646 --------------------
2651 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2653 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2662 --------------------
2669 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2678 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2680 ----------------------------------
2681 Bitmap Heap Scan on t1
2682 Recheck Cond: (c1 < $1)
2683 -> Bitmap Index Scan on t1_i1
2684 Index Cond: (c1 < $1)
2688 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2690 ----------------------------------
2691 Bitmap Heap Scan on t1
2692 Recheck Cond: (c1 < $1)
2693 -> Bitmap Index Scan on t1_i1
2694 Index Cond: (c1 < $1)
2698 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2700 ----------------------------------
2701 Bitmap Heap Scan on t1
2702 Recheck Cond: (c1 < $1)
2703 -> Bitmap Index Scan on t1_i1
2704 Index Cond: (c1 < $1)
2708 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2710 ----------------------------------
2711 Bitmap Heap Scan on t1
2712 Recheck Cond: (c1 < $1)
2713 -> Bitmap Index Scan on t1_i1
2714 Index Cond: (c1 < $1)
2718 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2720 ----------------------------------
2721 Bitmap Heap Scan on t1
2722 Recheck Cond: (c1 < $1)
2723 -> Bitmap Index Scan on t1_i1
2724 Index Cond: (c1 < $1)
2728 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2730 ----------------------------------
2731 Bitmap Heap Scan on t1
2732 Recheck Cond: (c1 < $1)
2733 -> Bitmap Index Scan on t1_i1
2734 Index Cond: (c1 < $1)
2737 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2739 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2748 ----------------------------------
2749 Bitmap Heap Scan on t1
2750 Recheck Cond: (c1 < $1)
2751 -> Bitmap Index Scan on t1_i1
2752 Index Cond: (c1 < $1)
2759 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2767 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2769 --------------------
2774 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2775 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2784 --------------------
2791 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2799 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2801 ----------------------------------
2802 Bitmap Heap Scan on t1
2803 Recheck Cond: (c1 < $1)
2804 -> Bitmap Index Scan on t1_i1
2805 Index Cond: (c1 < $1)
2808 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2810 ----------------------------------
2811 Bitmap Heap Scan on t1
2812 Recheck Cond: (c1 < $1)
2813 -> Bitmap Index Scan on t1_i1
2814 Index Cond: (c1 < $1)
2817 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2819 ----------------------------------
2820 Bitmap Heap Scan on t1
2821 Recheck Cond: (c1 < $1)
2822 -> Bitmap Index Scan on t1_i1
2823 Index Cond: (c1 < $1)
2826 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2828 ----------------------------------
2829 Bitmap Heap Scan on t1
2830 Recheck Cond: (c1 < $1)
2831 -> Bitmap Index Scan on t1_i1
2832 Index Cond: (c1 < $1)
2835 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2837 ----------------------------------
2838 Bitmap Heap Scan on t1
2839 Recheck Cond: (c1 < $1)
2840 -> Bitmap Index Scan on t1_i1
2841 Index Cond: (c1 < $1)
2844 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2846 ----------------------------------
2847 Bitmap Heap Scan on t1
2848 Recheck Cond: (c1 < $1)
2849 -> Bitmap Index Scan on t1_i1
2850 Index Cond: (c1 < $1)
2853 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2854 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2863 ----------------------------------
2864 Bitmap Heap Scan on t1
2865 Recheck Cond: (c1 < $1)
2866 -> Bitmap Index Scan on t1_i1
2867 Index Cond: (c1 < $1)
2873 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2875 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2877 ------------------------------
2878 Index Scan using t1_i1 on t1
2879 Index Cond: (c1 = 1)
2882 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2884 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2886 ------------------------------
2887 Index Scan using t1_i1 on t1
2888 Index Cond: (c1 = 1)
2892 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2894 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2896 ---------------------
2902 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2904 ---------------------
2910 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2912 ---------------------
2918 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2920 ---------------------
2926 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2928 ---------------------
2934 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2936 ---------------------
2941 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2943 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2945 ---------------------
2952 ---- No. A-8-4 EXECUTE statement name error
2956 ERROR: prepared statement "p1" does not exist
2957 SHOW pg_hint_plan.debug_print;
2958 pg_hint_plan.debug_print
2959 --------------------------
2964 ---- No. A-9-5 EXECUTE statement name error
2967 SELECT pg_stat_statements_reset();
2968 pg_stat_statements_reset
2969 --------------------------
2973 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2979 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2982 Set(enable_seqscan off)
2992 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3005 SELECT s.query, s.calls
3006 FROM public.pg_stat_statements s
3007 JOIN pg_catalog.pg_database d
3011 -------------------------------------------------------------------+-------
3012 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3013 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3014 SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3015 SELECT pg_stat_statements_reset(); | 1
3019 ---- No. A-10-1 duplicate hint
3022 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
3024 -----------------------------------------------------
3026 Join Filter: (t1.c1 = t4.c1)
3028 Join Filter: (t1.c1 = t3.c1)
3030 Join Filter: (t1.c1 = t2.c1)
3032 TID Cond: (ctid = '(1,1)'::tid)
3034 Filter: (ctid = '(1,1)'::tid)
3036 TID Cond: (ctid = '(1,1)'::tid)
3038 TID Cond: (ctid = '(1,1)'::tid)
3042 Set(enable_tidscan aaa)
3043 Set(enable_tidscan on)
3044 Set(enable_tidscan off)
3052 Leading(t2 t1 t4 t3)
3053 Leading(t1 t4 t3 t2)
3054 Leading(t4 t3 t2 t1)
3056 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
3057 INFO: hint syntax error at or near "SeqScan(t4)
3064 Leading(t2 t1 t4 t3)
3065 Leading(t1 t4 t3 t2)
3066 Leading(t4 t3 t2 t1)
3068 DETAIL: Conflict scan method hint.
3069 INFO: hint syntax error at or near "IndexScan(t4)
3075 Leading(t2 t1 t4 t3)
3076 Leading(t1 t4 t3 t2)
3077 Leading(t4 t3 t2 t1)
3079 DETAIL: Conflict scan method hint.
3080 INFO: hint syntax error at or near "BitmapScan(t4)
3085 Leading(t2 t1 t4 t3)
3086 Leading(t1 t4 t3 t2)
3087 Leading(t4 t3 t2 t1)
3089 DETAIL: Conflict scan method hint.
3090 INFO: hint syntax error at or near "NestLoop(t4 t3)
3093 Leading(t2 t1 t4 t3)
3094 Leading(t1 t4 t3 t2)
3095 Leading(t4 t3 t2 t1)
3097 DETAIL: Conflict join method hint.
3098 INFO: hint syntax error at or near "MergeJoin(t4 t3)
3100 Leading(t2 t1 t4 t3)
3101 Leading(t1 t4 t3 t2)
3102 Leading(t4 t3 t2 t1)
3104 DETAIL: Conflict join method hint.
3105 INFO: hint syntax error at or near "Leading(t2 t1 t4 t3)
3106 Leading(t1 t4 t3 t2)
3107 Leading(t4 t3 t2 t1)
3109 DETAIL: Conflict leading hint.
3110 INFO: hint syntax error at or near "Leading(t1 t4 t3 t2)
3111 Leading(t4 t3 t2 t1)
3113 DETAIL: Conflict leading hint.
3114 INFO: hint syntax error at or near "Set(enable_tidscan aaa)
3115 Set(enable_tidscan on)
3116 Set(enable_tidscan off)
3124 Leading(t2 t1 t4 t3)
3125 Leading(t1 t4 t3 t2)
3126 Leading(t4 t3 t2 t1)
3128 DETAIL: Conflict set hint.
3129 INFO: hint syntax error at or near "Set(enable_tidscan on)
3130 Set(enable_tidscan off)
3138 Leading(t2 t1 t4 t3)
3139 Leading(t1 t4 t3 t2)
3140 Leading(t4 t3 t2 t1)
3142 DETAIL: Conflict set hint.
3147 Leading(t4 t3 t2 t1)
3148 Set(enable_tidscan off)
3156 Leading(t2 t1 t4 t3)
3157 Leading(t1 t4 t3 t2)
3158 Set(enable_tidscan aaa)
3159 Set(enable_tidscan on)
3163 -----------------------------------------------------------
3166 Join Filter: (t3.c1 = t2.c1)
3168 Hash Cond: (t3.c1 = t4.c1)
3170 Filter: (ctid = '(1,1)'::tid)
3173 TID Cond: (ctid = '(1,1)'::tid)
3175 Filter: (ctid = '(1,1)'::tid)
3176 -> Index Scan using t1_i1 on t1
3177 Index Cond: (c1 = t2.c1)
3178 Filter: (ctid = '(1,1)'::tid)
3182 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
3184 -----------------------------------------------------
3186 Join Filter: (t1.c1 = t4.c1)
3188 Join Filter: (t1.c1 = t3.c1)
3190 Join Filter: (t1.c1 = t2.c1)
3192 TID Cond: (ctid = '(1,1)'::tid)
3194 Filter: (ctid = '(1,1)'::tid)
3196 TID Cond: (ctid = '(1,1)'::tid)
3198 TID Cond: (ctid = '(1,1)'::tid)
3203 Set(enable_tidscan aaa)
3206 Leading(t2 t1 t4 t3)
3207 Set(enable_tidscan on)
3210 Leading(t1 t4 t3 t2)
3211 Set(enable_tidscan off)
3214 Leading(t4 t3 t2 t1)
3216 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
3217 INFO: hint syntax error at or near "SeqScan(t4)
3218 Set(enable_tidscan aaa)
3221 Leading(t2 t1 t4 t3)
3222 Set(enable_tidscan on)
3225 Leading(t1 t4 t3 t2)
3226 Set(enable_tidscan off)
3229 Leading(t4 t3 t2 t1)
3231 DETAIL: Conflict scan method hint.
3232 INFO: hint syntax error at or near "IndexScan(t4)
3234 Leading(t2 t1 t4 t3)
3235 Set(enable_tidscan on)
3238 Leading(t1 t4 t3 t2)
3239 Set(enable_tidscan off)
3242 Leading(t4 t3 t2 t1)
3244 DETAIL: Conflict scan method hint.
3245 INFO: hint syntax error at or near "BitmapScan(t4)
3247 Leading(t1 t4 t3 t2)
3248 Set(enable_tidscan off)
3251 Leading(t4 t3 t2 t1)
3253 DETAIL: Conflict scan method hint.
3254 INFO: hint syntax error at or near "NestLoop(t4 t3)
3255 Leading(t2 t1 t4 t3)
3256 Set(enable_tidscan on)
3259 Leading(t1 t4 t3 t2)
3260 Set(enable_tidscan off)
3263 Leading(t4 t3 t2 t1)
3265 DETAIL: Conflict join method hint.
3266 INFO: hint syntax error at or near "MergeJoin(t4 t3)
3267 Leading(t1 t4 t3 t2)
3268 Set(enable_tidscan off)
3271 Leading(t4 t3 t2 t1)
3273 DETAIL: Conflict join method hint.
3274 INFO: hint syntax error at or near "Leading(t2 t1 t4 t3)
3275 Set(enable_tidscan on)
3278 Leading(t1 t4 t3 t2)
3279 Set(enable_tidscan off)
3282 Leading(t4 t3 t2 t1)
3284 DETAIL: Conflict leading hint.
3285 INFO: hint syntax error at or near "Leading(t1 t4 t3 t2)
3286 Set(enable_tidscan off)
3289 Leading(t4 t3 t2 t1)
3291 DETAIL: Conflict leading hint.
3292 INFO: hint syntax error at or near "Set(enable_tidscan aaa)
3295 Leading(t2 t1 t4 t3)
3296 Set(enable_tidscan on)
3299 Leading(t1 t4 t3 t2)
3300 Set(enable_tidscan off)
3303 Leading(t4 t3 t2 t1)
3305 DETAIL: Conflict set hint.
3306 INFO: hint syntax error at or near "Set(enable_tidscan on)
3309 Leading(t1 t4 t3 t2)
3310 Set(enable_tidscan off)
3313 Leading(t4 t3 t2 t1)
3315 DETAIL: Conflict set hint.
3320 Leading(t4 t3 t2 t1)
3321 Set(enable_tidscan off)
3329 Leading(t2 t1 t4 t3)
3330 Leading(t1 t4 t3 t2)
3331 Set(enable_tidscan aaa)
3332 Set(enable_tidscan on)
3336 -----------------------------------------------------------
3339 Join Filter: (t3.c1 = t2.c1)
3341 Hash Cond: (t3.c1 = t4.c1)
3343 Filter: (ctid = '(1,1)'::tid)
3346 TID Cond: (ctid = '(1,1)'::tid)
3348 Filter: (ctid = '(1,1)'::tid)
3349 -> Index Scan using t1_i1 on t1
3350 Index Cond: (c1 = t2.c1)
3351 Filter: (ctid = '(1,1)'::tid)
3355 ---- No. A-10-2 restrict query type
3358 EXPLAIN (COSTS false) SELECT * FROM s1.t1 FULL OUTER JOIN s1.t2 ON (t1.c1 = t2.c1);
3360 ------------------------------
3362 Hash Cond: (t1.c1 = t2.c1)
3368 /*+NestLoop(t1 t2)*/
3369 EXPLAIN (COSTS true) SELECT * FROM s1.t1 FULL OUTER JOIN s1.t2 ON (t1.c1 = t2.c1);
3378 --------------------------------------------------------------------------
3379 Hash Full Join (cost=10000000003.25..10000000024.00 rows=1000 width=29)
3380 Hash Cond: (t1.c1 = t2.c1)
3381 -> Seq Scan on t1 (cost=0.00..16.00 rows=1000 width=15)
3382 -> Hash (cost=2.00..2.00 rows=100 width=14)
3383 -> Seq Scan on t2 (cost=0.00..2.00 rows=100 width=14)
3387 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c3 = 1;
3389 ---------------------------------
3390 Bitmap Heap Scan on t1
3391 Recheck Cond: (c3 = 1)
3392 -> Bitmap Index Scan on t1_i
3393 Index Cond: (c3 = 1)
3396 /*+IndexScan(t1 t1_i1)*/
3397 EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c3 = 1;
3398 LOG: available indexes for IndexScan(t1): t1_i1
3407 ------------------------------------------------------------------------
3408 Seq Scan on t1 (cost=10000000000.00..10000000018.50 rows=10 width=15)
3413 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3415 ------------------------------
3416 Index Scan using t1_i1 on t1
3417 Index Cond: (c1 = 1)
3421 EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3430 -----------------------------------------------------------------------
3431 Seq Scan on t1 (cost=10000000000.00..10000000018.50 rows=1 width=15)
3436 ---- No. A-10-3 VIEW, RULE multi specified
3439 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
3441 ----------------------------------
3443 Hash Cond: (v1t1.c1 = v1t1.c1)
3444 -> Seq Scan on t1 v1t1
3446 -> Seq Scan on t1 v1t1
3449 /*+Leading(v1t1 v1t1)HashJoin(v1t1 v1t1)BitmapScan(v1t1)*/
3450 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
3451 INFO: hint syntax error at or near "HashJoin(v1t1 v1t1)BitmapScan(v1t1)"
3452 DETAIL: Relation name "v1t1" is ambiguous.
3453 INFO: hint syntax error at or near "Leading(v1t1 v1t1)HashJoin(v1t1 v1t1)BitmapScan(v1t1)"
3454 DETAIL: Relation name "v1t1" is ambiguous.
3465 ------------------------------------------
3467 -> Index Scan using t1_i1 on t1 v1t1
3468 -> Bitmap Heap Scan on t1 v1t1
3469 Recheck Cond: (c1 = v1t1.c1)
3470 -> Bitmap Index Scan on t1_i1
3471 Index Cond: (c1 = v1t1.c1)
3475 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
3477 -----------------------------------
3479 Hash Cond: (v1t1.c1 = v1t1_.c1)
3480 -> Seq Scan on t1 v1t1
3482 -> Seq Scan on t1 v1t1_
3485 /*+Leading(v1t1 v1t1_)NestLoop(v1t1 v1t1_)SeqScan(v1t1)BitmapScan(v1t1_)*/
3486 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
3491 NestLoop(v1t1 v1t1_)
3498 ------------------------------------------
3500 -> Seq Scan on t1 v1t1
3501 -> Bitmap Heap Scan on t1 v1t1_
3502 Recheck Cond: (c1 = v1t1.c1)
3503 -> Bitmap Index Scan on t1_i1
3504 Index Cond: (c1 = v1t1.c1)
3508 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
3510 ----------------------------------
3512 Hash Cond: (r4t1.c1 = r4t1.c1)
3513 -> Seq Scan on t1 r4t1
3515 -> Seq Scan on t1 r4t1
3518 /*+Leading(r4t1 r4t1)HashJoin(r4t1 r4t1)BitmapScan(r4t1)*/
3519 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
3520 INFO: hint syntax error at or near "HashJoin(r4t1 r4t1)BitmapScan(r4t1)"
3521 DETAIL: Relation name "r4t1" is ambiguous.
3522 INFO: hint syntax error at or near "Leading(r4t1 r4t1)HashJoin(r4t1 r4t1)BitmapScan(r4t1)"
3523 DETAIL: Relation name "r4t1" is ambiguous.
3534 ------------------------------------------
3536 -> Index Scan using t1_i1 on t1 r4t1
3537 -> Bitmap Heap Scan on t1 r4t1
3538 Recheck Cond: (c1 = r4t1.c1)
3539 -> Bitmap Index Scan on t1_i1
3540 Index Cond: (c1 = r4t1.c1)
3544 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
3546 ----------------------------------
3548 Hash Cond: (r4t1.c1 = r5t1.c1)
3549 -> Seq Scan on t1 r4t1
3551 -> Seq Scan on t1 r5t1
3554 /*+Leading(r4t1 r5t1)NestLoop(r4t1 r5t1)SeqScan(r4t1)BitmapScan(r5t1)*/
3555 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
3567 ------------------------------------------
3569 -> Seq Scan on t1 r4t1
3570 -> Bitmap Heap Scan on t1 r5t1
3571 Recheck Cond: (c1 = r4t1.c1)
3572 -> Bitmap Index Scan on t1_i1
3573 Index Cond: (c1 = r4t1.c1)
3577 ---- No. A-11-1 psql command
3579 SELECT count(*) FROM s1.t1 WHERE t1.c1 = 1;
3586 SELECT count(*) FROM s1.t1 WHERE t1.c1 = 1;
3602 SELECT count(*) FROM s1.t1 WHERE t1.c1 = 1;
3618 SELECT count(*) FROM s1.t1 WHERE t1.c1 = 1;
3626 ---- No. A-11-4 PL/pgSQL function
3629 CREATE OR REPLACE FUNCTION f1() RETURNS SETOF text LANGUAGE plpgsql AS $$
3633 FOR r IN EXPLAIN SELECT c4 FROM s1.t1 WHERE t1.c1 = 1
3635 RETURN NEXT r; -- return current row of SELECT
3642 ----------------------------------------------------------------
3643 Index Scan using t1_i1 on t1 (cost=0.00..8.27 rows=1 width=3)
3644 Index Cond: (c1 = 1)
3663 CONTEXT: PL/pgSQL function "f1" line 5 at FOR over SELECT rows
3665 ---------------------------------------------------
3666 Seq Scan on t1 (cost=0.00..18.50 rows=1 width=3)
3671 /*+SeqScan(t1)*/CREATE OR REPLACE FUNCTION f1() RETURNS SETOF text LANGUAGE plpgsql AS $$
3675 /*+SeqScan(t1)*/FOR r IN EXPLAIN /*+SeqScan(t1)*/SELECT c4 FROM s1.t1 WHERE t1.c1 = 1
3677 /*+SeqScan(t1)*/RETURN NEXT r; -- return current row of SELECT
3679 /*+SeqScan(t1)*/RETURN;
3684 ----------------------------------------------------------------
3685 Index Scan using t1_i1 on t1 (cost=0.00..8.27 rows=1 width=3)
3686 Index Cond: (c1 = 1)
3690 ---- No. A-12-1 reset of global variable of core at the error
3691 ---- No. A-12-2 reset of global variable of original at the error
3693 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3695 ------------------------------------
3697 Merge Cond: (t1.c1 = t2.c1)
3698 -> Index Scan using t1_i1 on t1
3704 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3705 PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3706 INFO: hint syntax error at or near "NestLoop(t1 t1)"
3707 DETAIL: Relation name "t1" is duplicated.
3712 Set(enable_seqscan off)
3713 Set(geqo_threshold 100)
3719 EXPLAIN (COSTS false) EXECUTE p1;
3721 ------------------------------------
3723 Merge Cond: (t1.c1 = t2.c1)
3727 -> Index Scan using t2_i1 on t2
3732 SELECT name, setting FROM settings;
3734 ---------------------------+-----------
3737 geqo_generations | 0
3740 geqo_selection_bias | 2
3742 constraint_exclusion | partition
3743 cursor_tuple_fraction | 0.1
3744 default_statistics_target | 100
3745 from_collapse_limit | 8
3746 join_collapse_limit | 8
3747 cpu_index_tuple_cost | 0.005
3748 cpu_operator_cost | 0.0025
3749 cpu_tuple_cost | 0.01
3750 effective_cache_size | 16384
3751 random_page_cost | 4
3753 enable_bitmapscan | on
3755 enable_hashjoin | on
3756 enable_indexscan | on
3757 enable_material | on
3758 enable_mergejoin | on
3759 enable_nestloop | on
3763 client_min_messages | log
3766 SET pg_hint_plan.parse_messages TO error;
3767 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3768 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3769 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3770 DETAIL: Relation name "t1" is duplicated.
3771 SELECT name, setting FROM settings;
3773 ---------------------------+-----------
3776 geqo_generations | 0
3779 geqo_selection_bias | 2
3781 constraint_exclusion | partition
3782 cursor_tuple_fraction | 0.1
3783 default_statistics_target | 100
3784 from_collapse_limit | 8
3785 join_collapse_limit | 8
3786 cpu_index_tuple_cost | 0.005
3787 cpu_operator_cost | 0.0025
3788 cpu_tuple_cost | 0.01
3789 effective_cache_size | 16384
3790 random_page_cost | 4
3792 enable_bitmapscan | on
3794 enable_hashjoin | on
3795 enable_indexscan | on
3796 enable_material | on
3797 enable_mergejoin | on
3798 enable_nestloop | on
3802 client_min_messages | log
3805 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3806 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3811 Set(enable_seqscan off)
3812 Set(geqo_threshold 100)
3818 ------------------------------------
3820 Merge Cond: (t1.c1 = t2.c1)
3824 -> Index Scan using t2_i1 on t2
3829 SELECT name, setting FROM settings;
3831 ---------------------------+-----------
3834 geqo_generations | 0
3837 geqo_selection_bias | 2
3839 constraint_exclusion | partition
3840 cursor_tuple_fraction | 0.1
3841 default_statistics_target | 100
3842 from_collapse_limit | 8
3843 join_collapse_limit | 8
3844 cpu_index_tuple_cost | 0.005
3845 cpu_operator_cost | 0.0025
3846 cpu_tuple_cost | 0.01
3847 effective_cache_size | 16384
3848 random_page_cost | 4
3850 enable_bitmapscan | on
3852 enable_hashjoin | on
3853 enable_indexscan | on
3854 enable_material | on
3855 enable_mergejoin | on
3856 enable_nestloop | on
3860 client_min_messages | log
3863 SET pg_hint_plan.parse_messages TO error;
3864 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3865 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3866 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3867 DETAIL: Relation name "t1" is duplicated.
3868 SELECT name, setting FROM settings;
3870 ---------------------------+-----------
3873 geqo_generations | 0
3876 geqo_selection_bias | 2
3878 constraint_exclusion | partition
3879 cursor_tuple_fraction | 0.1
3880 default_statistics_target | 100
3881 from_collapse_limit | 8
3882 join_collapse_limit | 8
3883 cpu_index_tuple_cost | 0.005
3884 cpu_operator_cost | 0.0025
3885 cpu_tuple_cost | 0.01
3886 effective_cache_size | 16384
3887 random_page_cost | 4
3889 enable_bitmapscan | on
3891 enable_hashjoin | on
3892 enable_indexscan | on
3893 enable_material | on
3894 enable_mergejoin | on
3895 enable_nestloop | on
3899 client_min_messages | log
3902 EXPLAIN (COSTS false) EXECUTE p1;
3904 ------------------------------------
3906 Merge Cond: (t1.c1 = t2.c1)
3910 -> Index Scan using t2_i1 on t2
3915 SELECT name, setting FROM settings;
3917 ---------------------------+-----------
3920 geqo_generations | 0
3923 geqo_selection_bias | 2
3925 constraint_exclusion | partition
3926 cursor_tuple_fraction | 0.1
3927 default_statistics_target | 100
3928 from_collapse_limit | 8
3929 join_collapse_limit | 8
3930 cpu_index_tuple_cost | 0.005
3931 cpu_operator_cost | 0.0025
3932 cpu_tuple_cost | 0.01
3933 effective_cache_size | 16384
3934 random_page_cost | 4
3936 enable_bitmapscan | on
3938 enable_hashjoin | on
3939 enable_indexscan | on
3940 enable_material | on
3941 enable_mergejoin | on
3942 enable_nestloop | on
3946 client_min_messages | log
3949 SET pg_hint_plan.parse_messages TO error;
3950 EXPLAIN (COSTS false) EXECUTE p2;
3951 ERROR: prepared statement "p2" does not exist
3952 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3953 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3958 Set(enable_seqscan off)
3959 Set(geqo_threshold 100)
3965 ------------------------------------
3967 Merge Cond: (t1.c1 = t2.c1)
3971 -> Index Scan using t2_i1 on t2
3974 EXPLAIN (COSTS false) EXECUTE p1;
3976 ------------------------------------
3978 Merge Cond: (t1.c1 = t2.c1)
3982 -> Index Scan using t2_i1 on t2
3985 SELECT name, setting FROM settings;
3987 ---------------------------+-----------
3990 geqo_generations | 0
3993 geqo_selection_bias | 2
3995 constraint_exclusion | partition
3996 cursor_tuple_fraction | 0.1
3997 default_statistics_target | 100
3998 from_collapse_limit | 8
3999 join_collapse_limit | 8
4000 cpu_index_tuple_cost | 0.005
4001 cpu_operator_cost | 0.0025
4002 cpu_tuple_cost | 0.01
4003 effective_cache_size | 16384
4004 random_page_cost | 4
4006 enable_bitmapscan | on
4008 enable_hashjoin | on
4009 enable_indexscan | on
4010 enable_material | on
4011 enable_mergejoin | on
4012 enable_nestloop | on
4016 client_min_messages | log
4021 SELECT name, setting FROM settings;
4023 ---------------------------+-----------
4026 geqo_generations | 0
4029 geqo_selection_bias | 2
4031 constraint_exclusion | partition
4032 cursor_tuple_fraction | 0.1
4033 default_statistics_target | 100
4034 from_collapse_limit | 8
4035 join_collapse_limit | 8
4036 cpu_index_tuple_cost | 0.005
4037 cpu_operator_cost | 0.0025
4038 cpu_tuple_cost | 0.01
4039 effective_cache_size | 16384
4040 random_page_cost | 4
4042 enable_bitmapscan | on
4044 enable_hashjoin | on
4045 enable_indexscan | on
4046 enable_material | on
4047 enable_mergejoin | on
4048 enable_nestloop | on
4052 client_min_messages | log
4055 SET pg_hint_plan.parse_messages TO error;
4056 EXPLAIN (COSTS false) EXECUTE p2;
4057 ERROR: prepared statement "p2" does not exist
4058 EXPLAIN (COSTS false) EXECUTE p1;
4060 ------------------------------------
4062 Merge Cond: (t1.c1 = t2.c1)
4066 -> Index Scan using t2_i1 on t2
4069 SELECT name, setting FROM settings;
4071 ---------------------------+-----------
4074 geqo_generations | 0
4077 geqo_selection_bias | 2
4079 constraint_exclusion | partition
4080 cursor_tuple_fraction | 0.1
4081 default_statistics_target | 100
4082 from_collapse_limit | 8
4083 join_collapse_limit | 8
4084 cpu_index_tuple_cost | 0.005
4085 cpu_operator_cost | 0.0025
4086 cpu_tuple_cost | 0.01
4087 effective_cache_size | 16384
4088 random_page_cost | 4
4090 enable_bitmapscan | on
4092 enable_hashjoin | on
4093 enable_indexscan | on
4094 enable_material | on
4095 enable_mergejoin | on
4096 enable_nestloop | on
4100 client_min_messages | log
4104 SET pg_hint_plan.parse_messages TO LOG;
4106 ---- No. A-12-3 effective range of the hint
4108 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4110 ------------------------------------
4112 Merge Cond: (t1.c1 = t2.c1)
4113 -> Index Scan using t1_i1 on t1
4120 SET enable_indexscan TO off;
4121 SET enable_mergejoin TO off;
4122 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4124 ------------------------------
4126 Hash Cond: (t1.c1 = t2.c1)
4132 SELECT name, setting FROM settings;
4134 ---------------------------+-----------
4137 geqo_generations | 0
4140 geqo_selection_bias | 2
4142 constraint_exclusion | partition
4143 cursor_tuple_fraction | 0.1
4144 default_statistics_target | 100
4145 from_collapse_limit | 8
4146 join_collapse_limit | 8
4147 cpu_index_tuple_cost | 0.005
4148 cpu_operator_cost | 0.0025
4149 cpu_tuple_cost | 0.01
4150 effective_cache_size | 16384
4151 random_page_cost | 4
4153 enable_bitmapscan | on
4155 enable_hashjoin | on
4156 enable_indexscan | off
4157 enable_material | on
4158 enable_mergejoin | off
4159 enable_nestloop | on
4163 client_min_messages | log
4166 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
4167 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4173 Set(enable_indexscan on)
4174 Set(geqo_threshold 100)
4180 ------------------------------------
4182 Merge Cond: (t1.c1 = t2.c1)
4183 -> Index Scan using t1_i1 on t1
4184 -> Index Scan using t2_i1 on t2
4187 SELECT name, setting FROM settings;
4189 ---------------------------+-----------
4192 geqo_generations | 0
4195 geqo_selection_bias | 2
4197 constraint_exclusion | partition
4198 cursor_tuple_fraction | 0.1
4199 default_statistics_target | 100
4200 from_collapse_limit | 8
4201 join_collapse_limit | 8
4202 cpu_index_tuple_cost | 0.005
4203 cpu_operator_cost | 0.0025
4204 cpu_tuple_cost | 0.01
4205 effective_cache_size | 16384
4206 random_page_cost | 4
4208 enable_bitmapscan | on
4210 enable_hashjoin | on
4211 enable_indexscan | off
4212 enable_material | on
4213 enable_mergejoin | off
4214 enable_nestloop | on
4218 client_min_messages | log
4221 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4223 ------------------------------
4225 Hash Cond: (t1.c1 = t2.c1)
4232 SET enable_indexscan TO off;
4233 SET enable_mergejoin TO off;
4234 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4236 ------------------------------
4238 Hash Cond: (t1.c1 = t2.c1)
4244 SELECT name, setting FROM settings;
4246 ---------------------------+-----------
4249 geqo_generations | 0
4252 geqo_selection_bias | 2
4254 constraint_exclusion | partition
4255 cursor_tuple_fraction | 0.1
4256 default_statistics_target | 100
4257 from_collapse_limit | 8
4258 join_collapse_limit | 8
4259 cpu_index_tuple_cost | 0.005
4260 cpu_operator_cost | 0.0025
4261 cpu_tuple_cost | 0.01
4262 effective_cache_size | 16384
4263 random_page_cost | 4
4265 enable_bitmapscan | on
4267 enable_hashjoin | on
4268 enable_indexscan | off
4269 enable_material | on
4270 enable_mergejoin | off
4271 enable_nestloop | on
4275 client_min_messages | log
4279 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
4280 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4286 Set(enable_indexscan on)
4287 Set(geqo_threshold 100)
4293 ------------------------------------
4295 Merge Cond: (t1.c1 = t2.c1)
4296 -> Index Scan using t1_i1 on t1
4297 -> Index Scan using t2_i1 on t2
4302 SELECT name, setting FROM settings;
4304 ---------------------------+-----------
4307 geqo_generations | 0
4310 geqo_selection_bias | 2
4312 constraint_exclusion | partition
4313 cursor_tuple_fraction | 0.1
4314 default_statistics_target | 100
4315 from_collapse_limit | 8
4316 join_collapse_limit | 8
4317 cpu_index_tuple_cost | 0.005
4318 cpu_operator_cost | 0.0025
4319 cpu_tuple_cost | 0.01
4320 effective_cache_size | 16384
4321 random_page_cost | 4
4323 enable_bitmapscan | on
4325 enable_hashjoin | on
4326 enable_indexscan | off
4327 enable_material | on
4328 enable_mergejoin | off
4329 enable_nestloop | on
4333 client_min_messages | log
4336 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4338 ------------------------------
4340 Hash Cond: (t1.c1 = t2.c1)
4348 SET enable_indexscan TO off;
4349 SET enable_mergejoin TO off;
4350 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4352 ------------------------------
4354 Hash Cond: (t1.c1 = t2.c1)
4360 SELECT name, setting FROM settings;
4362 ---------------------------+-----------
4365 geqo_generations | 0
4368 geqo_selection_bias | 2
4370 constraint_exclusion | partition
4371 cursor_tuple_fraction | 0.1
4372 default_statistics_target | 100
4373 from_collapse_limit | 8
4374 join_collapse_limit | 8
4375 cpu_index_tuple_cost | 0.005
4376 cpu_operator_cost | 0.0025
4377 cpu_tuple_cost | 0.01
4378 effective_cache_size | 16384
4379 random_page_cost | 4
4381 enable_bitmapscan | on
4383 enable_hashjoin | on
4384 enable_indexscan | off
4385 enable_material | on
4386 enable_mergejoin | off
4387 enable_nestloop | on
4391 client_min_messages | log
4394 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
4395 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4401 Set(enable_indexscan on)
4402 Set(geqo_threshold 100)
4408 ------------------------------------
4410 Merge Cond: (t1.c1 = t2.c1)
4411 -> Index Scan using t1_i1 on t1
4412 -> Index Scan using t2_i1 on t2
4416 SET enable_indexscan TO off;
4417 SET enable_mergejoin TO off;
4418 LOAD 'pg_hint_plan';
4419 SELECT name, setting FROM settings;
4421 ---------------------------+-----------
4424 geqo_generations | 0
4427 geqo_selection_bias | 2
4429 constraint_exclusion | partition
4430 cursor_tuple_fraction | 0.1
4431 default_statistics_target | 100
4432 from_collapse_limit | 8
4433 join_collapse_limit | 8
4434 cpu_index_tuple_cost | 0.005
4435 cpu_operator_cost | 0.0025
4436 cpu_tuple_cost | 0.01
4437 effective_cache_size | 16384
4438 random_page_cost | 4
4440 enable_bitmapscan | on
4442 enable_hashjoin | on
4443 enable_indexscan | off
4444 enable_material | on
4445 enable_mergejoin | off
4446 enable_nestloop | on
4450 client_min_messages | notice
4453 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4455 ------------------------------
4457 Hash Cond: (t1.c1 = t2.c1)
4463 SET pg_hint_plan.enable_hint TO on;
4464 SET pg_hint_plan.debug_print TO on;
4465 SET client_min_messages TO LOG;
4466 SET search_path TO public;
4467 RESET enable_indexscan;
4468 RESET enable_mergejoin;
4470 ---- No. A-13 call planner recursively
4472 CREATE OR REPLACE FUNCTION nested_planner(cnt int) RETURNS int AS $$
4476 RAISE NOTICE 'nested_planner(%)', cnt;
4483 EXECUTE '/*+ IndexScan(t_1) */'
4484 ' SELECT nested_planner($1) FROM s1.t1 t_1'
4485 ' JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)'
4486 ' ORDER BY t_1.c1 LIMIT 1'
4487 INTO new_cnt USING cnt - 1;
4491 $$ LANGUAGE plpgsql IMMUTABLE;
4493 ---- No. A-13-2 use hint of main query
4496 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4497 NOTICE: nested_planner(1)
4499 ----------------------------------
4500 Index Scan using t1_i1 on t1 t_1
4504 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4505 NOTICE: nested_planner(1)
4514 --------------------------
4517 -> Seq Scan on t1 t_1
4521 ---- No. A-13-3 output number of times of debugging log
4524 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4525 NOTICE: nested_planner(1)
4527 ----------------------------------
4528 Index Scan using t1_i1 on t1 t_1
4532 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4533 NOTICE: nested_planner(1)
4542 ----------------------------------
4543 Index Scan using t1_i1 on t1 t_1
4547 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
4548 NOTICE: nested_planner(2)
4549 NOTICE: nested_planner(1)
4550 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"
4551 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4553 ----------------------------------
4554 Index Scan using t1_i1 on t1 t_1
4558 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
4559 NOTICE: nested_planner(2)
4560 NOTICE: nested_planner(1)
4561 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"
4562 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4570 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"
4571 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4580 ----------------------------------
4581 Index Scan using t1_i1 on t1 t_1
4585 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
4586 NOTICE: nested_planner(5)
4587 NOTICE: nested_planner(4)
4588 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"
4589 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4590 NOTICE: nested_planner(3)
4591 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"
4592 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4593 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4594 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4595 NOTICE: nested_planner(2)
4596 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"
4597 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4598 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"
4599 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4600 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"
4601 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4602 NOTICE: nested_planner(1)
4603 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"
4604 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4605 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"
4606 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4607 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"
4608 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4609 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"
4610 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4612 ----------------------------------
4613 Index Scan using t1_i1 on t1 t_1
4617 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
4618 NOTICE: nested_planner(5)
4619 NOTICE: nested_planner(4)
4620 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"
4621 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4622 NOTICE: nested_planner(3)
4623 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"
4624 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4625 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"
4626 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4627 NOTICE: nested_planner(2)
4628 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"
4629 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4630 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4631 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4632 SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner($1) FROM s1.t1 t_1 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1) ORDER BY t_1.c1 LIMIT 1"
4633 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4634 NOTICE: nested_planner(1)
4635 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"
4636 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4637 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"
4638 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4639 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"
4640 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4641 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"
4642 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4650 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"
4651 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4652 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"
4653 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4654 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"
4655 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4656 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"
4657 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4665 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"
4666 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4667 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"
4668 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4669 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"
4670 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4678 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"
4679 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4680 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"
4681 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4689 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"
4690 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4699 ----------------------------------
4700 Index Scan using t1_i1 on t1 t_1
4704 ---- No. A-13-4 output of debugging log on hint status
4707 /*+HashJoin(t_1 t_2)*/
4708 EXPLAIN (COSTS false)
4709 SELECT nested_planner(2) FROM s1.t1 t_1
4710 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4712 NOTICE: nested_planner(2)
4713 NOTICE: nested_planner(1)
4714 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"
4715 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4723 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"
4724 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4733 --------------------------------------
4737 Hash Cond: (t_1.c1 = t_2.c1)
4738 -> Seq Scan on t1 t_1
4740 -> Seq Scan on t2 t_2
4744 /*+HashJoin(st_1 st_2)*/
4745 EXPLAIN (COSTS false)
4746 SELECT nested_planner(2) FROM s1.t1 st_1
4747 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4749 NOTICE: nested_planner(2)
4750 NOTICE: nested_planner(1)
4751 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"
4752 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4760 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"
4761 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4770 ----------------------------------------
4774 Hash Cond: (st_1.c1 = st_2.c1)
4775 -> Seq Scan on t1 st_1
4777 -> Seq Scan on t2 st_2
4781 /*+HashJoin(t_1 t_2)*/
4782 EXPLAIN (COSTS false)
4783 SELECT nested_planner(2) FROM s1.t1 st_1
4784 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4786 NOTICE: nested_planner(2)
4787 NOTICE: nested_planner(1)
4788 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"
4789 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4797 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"
4798 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4807 -----------------------------------------
4809 Merge Cond: (st_1.c1 = st_2.c1)
4810 -> Index Scan using t1_i1 on t1 st_1
4813 -> Seq Scan on t2 st_2
4817 /*+HashJoin(st_1 st_2)*/
4818 EXPLAIN (COSTS false)
4819 SELECT nested_planner(2) FROM s1.t1 t_1
4820 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4822 NOTICE: nested_planner(2)
4823 NOTICE: nested_planner(1)
4824 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"
4825 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4833 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"
4834 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4843 ----------------------------------------
4845 Merge Cond: (t_1.c1 = t_2.c1)
4846 -> Index Scan using t1_i1 on t1 t_1
4849 -> Seq Scan on t2 t_2
4853 /*+HashJoin(t_1 t_1)*/
4854 EXPLAIN (COSTS false)
4855 SELECT nested_planner(2) FROM s1.t1 t_1
4857 NOTICE: nested_planner(2)
4858 NOTICE: nested_planner(1)
4859 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"
4860 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4861 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4862 DETAIL: Relation name "t_1" is duplicated.
4863 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"
4864 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4872 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"
4873 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4882 ----------------------------------
4883 Index Scan using t1_i1 on t1 t_1
4887 CREATE OR REPLACE FUNCTION nested_planner_one_t(cnt int) RETURNS int AS $$
4891 RAISE NOTICE 'nested_planner_one_t(%)', cnt;
4897 EXECUTE '/*+ IndexScan(t_1) */'
4898 ' SELECT nested_planner_one_t($1) FROM s1.t1 t_1'
4899 ' ORDER BY t_1.c1 LIMIT 1'
4900 INTO new_cnt USING cnt - 1;
4904 $$ LANGUAGE plpgsql IMMUTABLE;
4905 EXPLAIN (COSTS false)
4906 SELECT nested_planner_one_t(2) FROM s1.t1 t_1
4907 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4909 NOTICE: nested_planner_one_t(2)
4910 NOTICE: nested_planner_one_t(1)
4911 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4912 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4914 ----------------------------------------
4916 Merge Cond: (t_1.c1 = t_2.c1)
4917 -> Index Scan using t1_i1 on t1 t_1
4920 -> Seq Scan on t2 t_2
4923 /*+HashJoin(t_1 t_1)*/
4924 EXPLAIN (COSTS false)
4925 SELECT nested_planner_one_t(2) FROM s1.t1 t_1
4926 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4928 NOTICE: nested_planner_one_t(2)
4929 NOTICE: nested_planner_one_t(1)
4930 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4931 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4939 CONTEXT: SQL statement "/*+ IndexScan(t_1) */ SELECT nested_planner_one_t($1) FROM s1.t1 t_1 ORDER BY t_1.c1 LIMIT 1"
4940 PL/pgSQL function "nested_planner_one_t" line 11 at EXECUTE statement
4941 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4942 DETAIL: Relation name "t_1" is duplicated.
4951 ----------------------------------------
4953 Merge Cond: (t_1.c1 = t_2.c1)
4954 -> Index Scan using t1_i1 on t1 t_1
4957 -> Seq Scan on t2 t_2
4960 DROP FUNCTION nested_planner_one_t(int);
4962 /*+HashJoin(t_1 t_1)*/
4963 EXPLAIN (COSTS false)
4964 SELECT nested_planner(2) FROM s1.t1 t_1
4965 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4967 NOTICE: nested_planner(2)
4968 NOTICE: nested_planner(1)
4969 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"
4970 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4971 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4972 DETAIL: Relation name "t_1" is duplicated.
4973 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"
4974 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4982 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"
4983 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
4984 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4985 DETAIL: Relation name "t_1" is duplicated.
4994 ----------------------------------------
4996 Merge Cond: (t_1.c1 = t_2.c1)
4997 -> Index Scan using t1_i1 on t1 t_1
5000 -> Seq Scan on t2 t_2
5004 /*+MergeJoin(t_1 t_2)HashJoin(t_1 t_2)*/
5005 EXPLAIN (COSTS false)
5006 SELECT nested_planner(2) FROM s1.t1 t_1
5007 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
5009 INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
5010 DETAIL: Conflict join method hint.
5011 NOTICE: nested_planner(2)
5012 INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
5013 DETAIL: Conflict join method hint.
5014 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"
5015 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
5016 NOTICE: nested_planner(1)
5017 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"
5018 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
5027 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"
5028 PL/pgSQL function "nested_planner" line 12 at EXECUTE statement
5038 --------------------------------------
5042 Hash Cond: (t_1.c1 = t_2.c1)
5043 -> Seq Scan on t1 t_1
5045 -> Seq Scan on t2 t_2