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
65 /* /*+SeqScan(t1)*/ */
66 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
68 ------------------------------
69 Index Scan using t1_i1 on t1
74 ---- No. A-5-2 hint position
77 EXPLAIN (COSTS false) SELECT c1 FROM s1.t1 WHERE t1.c1 = 1;
79 ------------------------------
80 Index Scan using t1_i1 on t1
85 EXPLAIN (COSTS false) SELECT c1 FROM s1.t1 WHERE t1.c1 = 1;
100 EXPLAIN (COSTS false) SELECT c1, c2 AS c_2 /*+SeqScan(t1)*/ FROM s1.t1 WHERE t1.c1 = 1;
115 EXPLAIN (COSTS false) SELECT c1 AS "c1"/*+SeqScan(t1)*/ FROM s1.t1 WHERE t1.c1 = 1;
117 ------------------------------
118 Index Scan using t1_i1 on t1
123 EXPLAIN (COSTS false) SELECT * /*+SeqScan(t1)*/ FROM s1.t1 WHERE t1.c1 = 1;
125 ------------------------------
126 Index Scan using t1_i1 on t1
131 ---- No. A-6-1 hint's table definition
133 SET pg_hint_plan.enable_hint_table TO on;
136 Table "hint_plan.hints"
137 Column | Type | Modifiers
138 -------------------+---------+--------------------------------------------------------------
139 id | integer | not null default nextval('hint_plan.hints_id_seq'::regclass)
140 norm_query_string | text | not null
141 application_name | text | not null
142 hints | text | not null
144 "hints_pkey" PRIMARY KEY, btree (id)
145 "hints_norm_and_app" UNIQUE, btree (norm_query_string, application_name)
148 ---- No. A-6-2 search condition
150 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
152 ------------------------------
153 Index Scan using t1_i1 on t1
158 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
160 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
163 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
178 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
180 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
183 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
192 ----------------------------------
193 Bitmap Heap Scan on t1
194 Recheck Cond: (c1 = 1)
195 -> Bitmap Index Scan on t1_i1
199 TRUNCATE hint_plan.hints;
201 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
203 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
204 'dummy_application_name',
207 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
209 ------------------------------
210 Index Scan using t1_i1 on t1
214 TRUNCATE hint_plan.hints;
216 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
218 'EXPLAIN (COSTS false) SELECT * FROM s1.t1;',
222 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
224 ------------------------------
225 Index Scan using t1_i1 on t1
229 TRUNCATE hint_plan.hints;
231 ---- No. A-6-3 number of constant
234 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
236 'EXPLAIN (COSTS false) SELECT c1 FROM s1.t1;',
240 EXPLAIN (COSTS false) SELECT c1 FROM s1.t1;
253 TRUNCATE hint_plan.hints;
255 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
257 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
261 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
275 TRUNCATE hint_plan.hints;
277 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
279 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ? OR t1.c1 = ?;',
283 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 OR t1.c1 = 0;
292 ----------------------------------
294 Filter: ((c1 = 1) OR (c1 = 0))
297 TRUNCATE hint_plan.hints;
298 SET pg_hint_plan.enable_hint_table TO off;
300 ---- No. A-7-2 hint delimiter
302 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
304 ------------------------------
305 Index Scan using t1_i1 on t1
316 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
317 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
320 Set(enable_bitmapscan off)
321 Set(enable_indexscan off)
333 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
334 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
337 Set(enable_bitmapscan off)
338 Set(enable_indexscan off)
350 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
351 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
354 Set(enable_bitmapscan off)
355 Set(enable_indexscan off)
367 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
368 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
371 Set(enable_bitmapscan off)
372 Set(enable_indexscan off)
384 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
385 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
388 Set(enable_bitmapscan off)
389 Set(enable_indexscan off)
401 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
402 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
405 Set(enable_bitmapscan off)
406 Set(enable_indexscan off)
418 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
419 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
422 Set(enable_bitmapscan off)
423 Set(enable_indexscan off)
435 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
436 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
439 Set(enable_bitmapscan off)
440 Set(enable_indexscan off)
452 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
453 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
456 Set(enable_bitmapscan off)
457 Set(enable_indexscan off)
469 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
470 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
473 Set(enable_bitmapscan off)
474 Set(enable_indexscan off)
486 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
487 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
490 Set(enable_bitmapscan off)
491 Set(enable_indexscan off)
503 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
504 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
507 Set(enable_bitmapscan off)
508 Set(enable_indexscan off)
520 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
521 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
524 Set(enable_bitmapscan off)
525 Set(enable_indexscan off)
537 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
538 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
541 Set(enable_bitmapscan off)
542 Set(enable_indexscan off)
554 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
555 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
558 Set(enable_bitmapscan off)
559 Set(enable_indexscan off)
572 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
573 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
576 Set(enable_bitmapscan off)
577 Set(enable_indexscan off)
589 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
591 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
594 Set(enable_bitmapscan off)
595 Set(enable_indexscan off)
609 (enable_indexscan"off")
611 (enable_bitmapscan"off")*/
612 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
615 Set(enable_bitmapscan off)
616 Set(enable_indexscan off)
630 enable_indexscan"off")Set
632 enable_bitmapscan"off")*/
633 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
636 Set(enable_bitmapscan off)
637 Set(enable_indexscan off)
649 /*+Set(enable_indexscan"off"
651 Set(enable_bitmapscan"off"
654 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
657 Set(enable_bitmapscan off)
658 Set(enable_indexscan off)
677 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
680 Set(enable_bitmapscan off)
681 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)
722 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
723 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
726 Set(enable_bitmapscan off)
727 Set(enable_indexscan off)
739 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
741 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
744 Set(enable_bitmapscan off)
745 Set(enable_indexscan off)
759 (enable_indexscan"off")
761 (enable_bitmapscan"off")*/
762 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
765 Set(enable_bitmapscan off)
766 Set(enable_indexscan off)
780 enable_indexscan"off")Set
782 enable_bitmapscan"off")*/
783 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
786 Set(enable_bitmapscan off)
787 Set(enable_indexscan off)
799 /*+Set(enable_indexscan"off"
801 Set(enable_bitmapscan"off"
804 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
807 Set(enable_bitmapscan off)
808 Set(enable_indexscan off)
827 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
830 Set(enable_bitmapscan off)
831 Set(enable_indexscan off)
855 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
858 Set(enable_bitmapscan off)
859 Set(enable_indexscan off)
871 ---- No. A-7-3 hint object pattern
872 ---- No. A-9-2 message object pattern
877 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
892 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
907 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
922 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
939 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
954 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
963 ----------------------
969 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
984 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
993 ----------------------
1001 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
1002 INFO: hint syntax error at or near "()"
1003 DETAIL: Zero-length delimited string.
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 --------------------
1028 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
1029 INFO: hint syntax error at or near ")"
1030 DETAIL: SeqScan hint requires a relation.
1031 INFO: hint syntax error at or near ")"
1032 DETAIL: Unrecognized hint keyword ")".
1041 ----------------------------------
1042 Index Scan using t1_i1 on t1 ")"
1043 Index Cond: (c1 = 1)
1047 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
1056 --------------------
1062 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")))" WHERE ")))".c1 = 1;
1071 ----------------------
1072 Seq Scan on t1 ")))"
1079 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
1080 INFO: hint syntax error at or near ""
1081 DETAIL: Unterminated quoted string.
1083 -----------------------------------
1084 Index Scan using t1_i1 on t1 """"
1085 Index Cond: (c1 = 1)
1089 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
1098 ---------------------
1103 /*+SeqScan("""""""")*/
1104 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """""""" WHERE """""""".c1 = 1;
1113 -------------------------
1114 Seq Scan on t1 """"""""
1121 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1122 INFO: hint syntax error at or near ""
1123 DETAIL: SeqScan hint requires a relation.
1132 ----------------------------------
1133 Index Scan using t1_i1 on t1 " "
1134 Index Cond: (c1 = 1)
1138 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1147 --------------------
1153 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1162 ----------------------
1170 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1171 INFO: hint syntax error at or near ""
1172 DETAIL: SeqScan hint requires a relation.
1181 -----------------------------------
1182 Index Scan using t1_i1 on t1 " "
1183 Index Cond: (c1 = 1)
1187 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1196 ---------------------------
1202 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1211 -------------------------------------------
1220 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1223 INFO: hint syntax error at or near ""
1224 DETAIL: SeqScan hint requires a relation.
1233 --------------------------------
1234 Index Scan using t1_i1 on t1 "
1236 Index Cond: (c1 = 1)
1241 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1253 --------------------
1263 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1281 --------------------
1292 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1301 ----------------------
1302 Seq Scan on t1 "Set"
1307 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1316 ----------------------
1317 Seq Scan on t1 "Set"
1321 /*+SeqScan("Set SeqScan Leading")*/
1322 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set SeqScan Leading" WHERE "Set SeqScan Leading".c1 = 1;
1325 SeqScan("Set SeqScan Leading")
1331 --------------------------------------
1332 Seq Scan on t1 "Set SeqScan Leading"
1339 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1348 ---------------------
1354 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1363 -------------------------
1364 Seq Scan on t1 "あいう"
1369 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1378 ---------------------
1384 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1393 -------------------------
1394 Seq Scan on t1 "あいう"
1401 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;
1402 INFO: hint syntax error at or near "/**/)*/
1403 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;"
1404 DETAIL: Nested block comments are not supported.
1406 -------------------------------------
1407 Index Scan using t1_i1 on t1 "/**/"
1408 Index Cond: (c1 = 1)
1411 /*+SeqScan(/**//**//**/)*/
1412 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;
1413 INFO: hint syntax error at or near "/**//**//**/)*/
1414 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;"
1415 DETAIL: Nested block comments are not supported.
1417 ---------------------------------------------
1418 Index Scan using t1_i1 on t1 "/**//**//**/"
1419 Index Cond: (c1 = 1)
1426 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1427 Set/**/あ" WHERE "tT()""
1429 INFO: hint syntax error at or near "/**/あ")*/
1430 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1431 Set/**/あ" WHERE "tT()""
1433 DETAIL: Nested block comments are not supported.
1435 ------------------------------------------
1436 Index Scan using t1_i1 on t1 "tT()""
1438 Index Cond: (c1 = 1)
1444 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1456 --------------------------
1457 Seq Scan on t1 "tT()""
1464 /*+SeqScan(a123456789b123456789c123456789d123456789e123456789f123)*/
1465 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "123456789012345678901234567890123456789012345678901234" WHERE "123456789012345678901234567890123456789012345678901234".c1 = 1;
1469 SeqScan(a123456789b123456789c123456789d123456789e123456789f123)
1474 ---------------------------------------------------------------------------------------
1475 Index Scan using t1_i1 on t1 "123456789012345678901234567890123456789012345678901234"
1476 Index Cond: (c1 = 1)
1480 ---- No. A-7-4 hint parse error
1483 /*+Set(enable_indexscan off)Set enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1484 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1485 INFO: hint syntax error at or near "enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1486 DETAIL: Opening parenthesis is necessary.
1489 Set(enable_indexscan off)
1495 ----------------------------------
1496 Bitmap Heap Scan on t1
1497 Recheck Cond: (c1 = 1)
1498 -> Bitmap Index Scan on t1_i1
1499 Index Cond: (c1 = 1)
1503 /*+Set(enable_indexscan off)Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)*/
1504 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1505 INFO: hint syntax error at or near "(enable_bitmapscan off)SeqScan(t1)"
1506 DETAIL: Zero-length delimited string.
1509 Set(enable_indexscan off)
1515 ----------------------------------
1516 Bitmap Heap Scan on t1
1517 Recheck Cond: (c1 = 1)
1518 -> Bitmap Index Scan on t1_i1
1519 Index Cond: (c1 = 1)
1523 /*+Set(enable_indexscan off)Set(enable_tidscan "off)Set(enable_bitmapscan off)SeqScan(t1)*/
1524 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1525 INFO: hint syntax error at or near ""
1526 DETAIL: Unterminated quoted string.
1529 Set(enable_indexscan off)
1535 ----------------------------------
1536 Bitmap Heap Scan on t1
1537 Recheck Cond: (c1 = 1)
1538 -> Bitmap Index Scan on t1_i1
1539 Index Cond: (c1 = 1)
1543 /*+Set(enable_indexscan off)SeqScan("")Set(enable_bitmapscan off)*/
1544 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1545 INFO: hint syntax error at or near ")Set(enable_bitmapscan off)"
1546 DETAIL: Zero-length delimited string.
1549 Set(enable_indexscan off)
1555 ----------------------------------
1556 Bitmap Heap Scan on t1
1557 Recheck Cond: (c1 = 1)
1558 -> Bitmap Index Scan on t1_i1
1559 Index Cond: (c1 = 1)
1563 /*+Set(enable_indexscan off)NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1564 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1565 INFO: hint syntax error at or near "NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1566 DETAIL: Unrecognized hint keyword "NoSet".
1569 Set(enable_indexscan off)
1575 ----------------------------------
1576 Bitmap Heap Scan on t1
1577 Recheck Cond: (c1 = 1)
1578 -> Bitmap Index Scan on t1_i1
1579 Index Cond: (c1 = 1)
1583 /*+Set(enable_indexscan off)"Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1584 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1585 INFO: hint syntax error at or near ""Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1586 DETAIL: Unrecognized hint keyword ""Set"".
1589 Set(enable_indexscan off)
1595 ----------------------------------
1596 Bitmap Heap Scan on t1
1597 Recheck Cond: (c1 = 1)
1598 -> Bitmap Index Scan on t1_i1
1599 Index Cond: (c1 = 1)
1603 /*+Set(enable_indexscan off)Set(enable_tidscan /* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1604 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1605 INFO: hint syntax error at or near "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1606 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
1607 DETAIL: Nested block comments are not supported.
1609 ------------------------------
1610 Index Scan using t1_i1 on t1
1611 Index Cond: (c1 = 1)
1615 ---- No. A-8-1 original GUC parameter
1618 SET ROLE super_user;
1619 SET pg_hint_plan.debug_print TO off;
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 -----------------------------
1638 SET pg_hint_plan.enable_hint TO off;
1639 SET pg_hint_plan.debug_print TO on;
1640 SET pg_hint_plan.parse_messages TO error;
1641 SHOW pg_hint_plan.enable_hint;
1642 pg_hint_plan.enable_hint
1643 --------------------------
1647 SHOW pg_hint_plan.debug_print;
1648 pg_hint_plan.debug_print
1649 --------------------------
1653 SHOW pg_hint_plan.parse_messages;
1654 pg_hint_plan.parse_messages
1655 -----------------------------
1659 RESET pg_hint_plan.enable_hint;
1660 RESET pg_hint_plan.debug_print;
1661 RESET pg_hint_plan.parse_messages;
1662 SHOW pg_hint_plan.enable_hint;
1663 pg_hint_plan.enable_hint
1664 --------------------------
1668 SHOW pg_hint_plan.debug_print;
1669 pg_hint_plan.debug_print
1670 --------------------------
1674 SHOW pg_hint_plan.parse_messages;
1675 pg_hint_plan.parse_messages
1676 -----------------------------
1681 SET ROLE normal_user;
1682 SHOW pg_hint_plan.enable_hint;
1683 pg_hint_plan.enable_hint
1684 --------------------------
1688 SHOW pg_hint_plan.debug_print;
1689 pg_hint_plan.debug_print
1690 --------------------------
1694 SHOW pg_hint_plan.parse_messages;
1695 pg_hint_plan.parse_messages
1696 -----------------------------
1700 SET pg_hint_plan.enable_hint TO off;
1701 SET pg_hint_plan.debug_print TO on;
1702 SET pg_hint_plan.parse_messages TO error;
1703 SHOW pg_hint_plan.enable_hint;
1704 pg_hint_plan.enable_hint
1705 --------------------------
1709 SHOW pg_hint_plan.debug_print;
1710 pg_hint_plan.debug_print
1711 --------------------------
1715 SHOW pg_hint_plan.parse_messages;
1716 pg_hint_plan.parse_messages
1717 -----------------------------
1721 RESET pg_hint_plan.enable_hint;
1722 RESET pg_hint_plan.debug_print;
1723 RESET pg_hint_plan.parse_messages;
1724 SHOW pg_hint_plan.enable_hint;
1725 pg_hint_plan.enable_hint
1726 --------------------------
1730 SHOW pg_hint_plan.debug_print;
1731 pg_hint_plan.debug_print
1732 --------------------------
1736 SHOW pg_hint_plan.parse_messages;
1737 pg_hint_plan.parse_messages
1738 -----------------------------
1744 ---- No. A-8-2 original GUC parameter pg_hint_plan.enable_hint
1747 SET pg_hint_plan.enable_hint TO on;
1748 SHOW pg_hint_plan.enable_hint;
1749 pg_hint_plan.enable_hint
1750 --------------------------
1754 /*+Set(enable_indexscan off)*/
1755 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1757 ----------------------------------
1758 Bitmap Heap Scan on t1
1759 Recheck Cond: (c1 = 1)
1760 -> Bitmap Index Scan on t1_i1
1761 Index Cond: (c1 = 1)
1765 SET pg_hint_plan.enable_hint TO off;
1766 SHOW pg_hint_plan.enable_hint;
1767 pg_hint_plan.enable_hint
1768 --------------------------
1772 /*+Set(enable_indexscan off)*/
1773 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1775 ------------------------------
1776 Index Scan using t1_i1 on t1
1777 Index Cond: (c1 = 1)
1781 SET pg_hint_plan.enable_hint TO DEFAULT;
1782 SHOW pg_hint_plan.enable_hint;
1783 pg_hint_plan.enable_hint
1784 --------------------------
1788 /*+Set(enable_indexscan off)*/
1789 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1791 ----------------------------------
1792 Bitmap Heap Scan on t1
1793 Recheck Cond: (c1 = 1)
1794 -> Bitmap Index Scan on t1_i1
1795 Index Cond: (c1 = 1)
1799 SET pg_hint_plan.enable_hint TO enable;
1800 ERROR: parameter "pg_hint_plan.enable_hint" requires a Boolean value
1801 SHOW pg_hint_plan.enable_hint;
1802 pg_hint_plan.enable_hint
1803 --------------------------
1808 ---- No. A-8-3 original GUC parameter pg_hint_plan.debug_print
1811 SET pg_hint_plan.debug_print TO on;
1812 SHOW pg_hint_plan.debug_print;
1813 pg_hint_plan.debug_print
1814 --------------------------
1818 /*+Set(enable_indexscan off)*/
1819 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1822 Set(enable_indexscan off)
1828 ----------------------------------
1829 Bitmap Heap Scan on t1
1830 Recheck Cond: (c1 = 1)
1831 -> Bitmap Index Scan on t1_i1
1832 Index Cond: (c1 = 1)
1836 SET pg_hint_plan.debug_print TO off;
1837 SHOW pg_hint_plan.debug_print;
1838 pg_hint_plan.debug_print
1839 --------------------------
1843 /*+Set(enable_indexscan off)*/
1844 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1846 ----------------------------------
1847 Bitmap Heap Scan on t1
1848 Recheck Cond: (c1 = 1)
1849 -> Bitmap Index Scan on t1_i1
1850 Index Cond: (c1 = 1)
1854 SET pg_hint_plan.debug_print TO DEFAULT;
1855 SHOW pg_hint_plan.debug_print;
1856 pg_hint_plan.debug_print
1857 --------------------------
1861 /*+Set(enable_indexscan off)*/
1862 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1864 ----------------------------------
1865 Bitmap Heap Scan on t1
1866 Recheck Cond: (c1 = 1)
1867 -> Bitmap Index Scan on t1_i1
1868 Index Cond: (c1 = 1)
1872 SET pg_hint_plan.debug_print TO enable;
1873 ERROR: parameter "pg_hint_plan.debug_print" requires a Boolean value
1874 SHOW pg_hint_plan.debug_print;
1875 pg_hint_plan.debug_print
1876 --------------------------
1881 ---- No. A-8-4 original GUC parameter pg_hint_plan.parse_messages
1883 SET client_min_messages TO debug5;
1884 DEBUG: CommitTransactionCommand
1885 DEBUG: CommitTransaction
1886 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1888 SET pg_hint_plan.parse_messages TO debug5;
1889 DEBUG: StartTransactionCommand
1890 DEBUG: StartTransaction
1891 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1892 DEBUG: ProcessUtility
1893 DEBUG: CommitTransactionCommand
1894 DEBUG: CommitTransaction
1895 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1896 SHOW pg_hint_plan.parse_messages;
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 pg_hint_plan.parse_messages
1905 -----------------------------
1910 DEBUG: StartTransactionCommand
1911 DEBUG: StartTransaction
1912 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1913 DEBUG: hint syntax error at or near ""
1914 DETAIL: Opening parenthesis is necessary.
1915 DEBUG: CommitTransactionCommand
1916 DEBUG: CommitTransaction
1917 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1923 SET client_min_messages TO debug4;
1924 DEBUG: StartTransactionCommand
1925 DEBUG: StartTransaction
1926 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1927 DEBUG: ProcessUtility
1928 DEBUG: CommitTransactionCommand
1929 DEBUG: CommitTransaction
1930 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
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: CommitTransactionCommand
1936 DEBUG: CommitTransaction
1937 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1944 SET pg_hint_plan.parse_messages TO debug4;
1945 DEBUG: StartTransactionCommand
1946 DEBUG: StartTransaction
1947 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1948 DEBUG: ProcessUtility
1949 DEBUG: CommitTransactionCommand
1950 DEBUG: CommitTransaction
1951 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1952 SHOW pg_hint_plan.parse_messages;
1953 DEBUG: StartTransactionCommand
1954 DEBUG: StartTransaction
1955 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1956 DEBUG: ProcessUtility
1957 DEBUG: CommitTransactionCommand
1958 DEBUG: CommitTransaction
1959 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1960 pg_hint_plan.parse_messages
1961 -----------------------------
1966 DEBUG: StartTransactionCommand
1967 DEBUG: StartTransaction
1968 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1969 DEBUG: hint syntax error at or near ""
1970 DETAIL: Opening parenthesis is necessary.
1971 DEBUG: CommitTransactionCommand
1972 DEBUG: CommitTransaction
1973 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1979 SET client_min_messages TO debug3;
1980 DEBUG: StartTransactionCommand
1981 DEBUG: StartTransaction
1982 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1983 DEBUG: ProcessUtility
1984 DEBUG: CommitTransactionCommand
1985 DEBUG: CommitTransaction
1986 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1988 DEBUG: StartTransactionCommand
1989 DEBUG: StartTransaction
1990 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1991 DEBUG: CommitTransactionCommand
1992 DEBUG: CommitTransaction
1993 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2000 SET pg_hint_plan.parse_messages TO debug3;
2001 DEBUG: StartTransactionCommand
2002 DEBUG: StartTransaction
2003 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2004 DEBUG: ProcessUtility
2005 DEBUG: CommitTransactionCommand
2006 DEBUG: CommitTransaction
2007 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2008 SHOW pg_hint_plan.parse_messages;
2009 DEBUG: StartTransactionCommand
2010 DEBUG: StartTransaction
2011 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2012 DEBUG: ProcessUtility
2013 DEBUG: CommitTransactionCommand
2014 DEBUG: CommitTransaction
2015 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2016 pg_hint_plan.parse_messages
2017 -----------------------------
2022 DEBUG: StartTransactionCommand
2023 DEBUG: StartTransaction
2024 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2025 DEBUG: hint syntax error at or near ""
2026 DETAIL: Opening parenthesis is necessary.
2027 DEBUG: CommitTransactionCommand
2028 DEBUG: CommitTransaction
2029 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2035 SET client_min_messages TO debug2;
2036 DEBUG: StartTransactionCommand
2037 DEBUG: StartTransaction
2038 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2039 DEBUG: ProcessUtility
2047 SET pg_hint_plan.parse_messages TO debug2;
2048 SHOW pg_hint_plan.parse_messages;
2049 pg_hint_plan.parse_messages
2050 -----------------------------
2055 DEBUG: hint syntax error at or near ""
2056 DETAIL: Opening parenthesis is necessary.
2062 SET client_min_messages TO debug1;
2070 SET pg_hint_plan.parse_messages TO debug1;
2071 SHOW pg_hint_plan.parse_messages;
2072 pg_hint_plan.parse_messages
2073 -----------------------------
2078 DEBUG: hint syntax error at or near ""
2079 DETAIL: Opening parenthesis is necessary.
2085 SET client_min_messages TO log;
2093 SET pg_hint_plan.parse_messages TO log;
2094 SHOW pg_hint_plan.parse_messages;
2095 pg_hint_plan.parse_messages
2096 -----------------------------
2101 LOG: hint syntax error at or near ""
2102 DETAIL: Opening parenthesis is necessary.
2108 SET client_min_messages TO info;
2116 SET pg_hint_plan.parse_messages TO info;
2117 SHOW pg_hint_plan.parse_messages;
2118 pg_hint_plan.parse_messages
2119 -----------------------------
2124 INFO: hint syntax error at or near ""
2125 DETAIL: Opening parenthesis is necessary.
2131 SET client_min_messages TO notice;
2133 INFO: hint syntax error at or near ""
2134 DETAIL: Opening parenthesis is necessary.
2141 SET pg_hint_plan.parse_messages TO notice;
2142 SHOW pg_hint_plan.parse_messages;
2143 pg_hint_plan.parse_messages
2144 -----------------------------
2149 NOTICE: hint syntax error at or near ""
2150 DETAIL: Opening parenthesis is necessary.
2156 SET client_min_messages TO warning;
2164 SET pg_hint_plan.parse_messages TO warning;
2165 SHOW pg_hint_plan.parse_messages;
2166 pg_hint_plan.parse_messages
2167 -----------------------------
2172 WARNING: hint syntax error at or near ""
2173 DETAIL: Opening parenthesis is necessary.
2179 SET client_min_messages TO error;
2187 SET pg_hint_plan.parse_messages TO error;
2188 SHOW pg_hint_plan.parse_messages;
2189 pg_hint_plan.parse_messages
2190 -----------------------------
2195 ERROR: hint syntax error at or near ""
2196 DETAIL: Opening parenthesis is necessary.
2197 SET client_min_messages TO fatal;
2200 RESET client_min_messages;
2201 SET pg_hint_plan.parse_messages TO DEFAULT;
2202 SHOW pg_hint_plan.parse_messages;
2203 pg_hint_plan.parse_messages
2204 -----------------------------
2209 INFO: hint syntax error at or near ""
2210 DETAIL: Opening parenthesis is necessary.
2217 SET pg_hint_plan.parse_messages TO fatal;
2218 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "fatal"
2219 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2220 SHOW pg_hint_plan.parse_messages;
2221 pg_hint_plan.parse_messages
2222 -----------------------------
2227 SET pg_hint_plan.parse_messages TO panic;
2228 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "panic"
2229 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2230 SHOW pg_hint_plan.parse_messages;
2231 pg_hint_plan.parse_messages
2232 -----------------------------
2237 SET pg_hint_plan.parse_messages TO on;
2238 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "on"
2239 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2240 SHOW pg_hint_plan.parse_messages;
2241 pg_hint_plan.parse_messages
2242 -----------------------------
2247 ---- No. A-8-5 original GUC parameter pg_hint_plan.enable_hint_table
2249 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
2251 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
2255 SET pg_hint_plan.enable_hint_table TO on;
2256 SHOW pg_hint_plan.enable_hint_table;
2257 pg_hint_plan.enable_hint_table
2258 --------------------------------
2262 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2264 --------------------
2270 SET pg_hint_plan.enable_hint_table TO off;
2271 SHOW pg_hint_plan.enable_hint_table;
2272 pg_hint_plan.enable_hint_table
2273 --------------------------------
2277 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2279 ------------------------------
2280 Index Scan using t1_i1 on t1
2281 Index Cond: (c1 = 1)
2285 SET pg_hint_plan.enable_hint_table TO DEFAULT;
2286 SHOW pg_hint_plan.enable_hint_table;
2287 pg_hint_plan.enable_hint_table
2288 --------------------------------
2292 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2294 ------------------------------
2295 Index Scan using t1_i1 on t1
2296 Index Cond: (c1 = 1)
2300 SET pg_hint_plan.enable_hint_table TO enable;
2301 ERROR: parameter "pg_hint_plan.enable_hint_table" requires a Boolean value
2302 SHOW pg_hint_plan.enable_hint_table;
2303 pg_hint_plan.enable_hint_table
2304 --------------------------------
2308 TRUNCATE hint_plan.hints;
2310 ---- No. A-9-1 parse error message output
2313 /*+"Set"(enable_indexscan on)*/SELECT 1;
2314 INFO: hint syntax error at or near ""Set"(enable_indexscan on)"
2315 DETAIL: Unrecognized hint keyword ""Set"".
2321 /*+Set()(enable_indexscan on)*/SELECT 1;
2322 INFO: hint syntax error at or near "Set()(enable_indexscan on)"
2323 DETAIL: Set hint requires name and value of GUC parameter.
2324 INFO: hint syntax error at or near "(enable_indexscan on)"
2325 DETAIL: Unrecognized hint keyword "".
2331 /*+Set(enable_indexscan on*/SELECT 1;
2332 INFO: hint syntax error at or near ""
2333 DETAIL: Closing parenthesis is necessary.
2340 ---- No. A-9-3 hint state output
2342 SET pg_hint_plan.debug_print TO on;
2343 SET client_min_messages TO LOG;
2346 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2355 --------------------
2361 /*+SeqScan(no_table)*/
2362 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2371 ------------------------------
2372 Index Scan using t1_i1 on t1
2373 Index Cond: (c1 = 1)
2377 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2379 -----------------------------------
2381 TID Cond: (ctid = '(1,1)'::tid)
2385 /*+TidScan(t1)BitmapScan(t1)*/
2386 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2387 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)"
2388 DETAIL: Conflict scan method hint.
2398 ----------------------------------
2399 Bitmap Heap Scan on t1
2400 Recheck Cond: (c1 = 1)
2401 Filter: (ctid = '(1,1)'::tid)
2402 -> Bitmap Index Scan on t1_i1
2403 Index Cond: (c1 = 1)
2406 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)*/
2407 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2408 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)"
2409 DETAIL: Conflict scan method hint.
2410 INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)"
2411 DETAIL: Conflict scan method hint.
2422 ---------------------------------
2423 Index Scan using t1_i1 on t1
2424 Index Cond: (c1 = 1)
2425 Filter: (ctid = '(1,1)'::tid)
2428 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)*/
2429 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2430 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2431 DETAIL: Conflict scan method hint.
2432 INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2433 DETAIL: Conflict scan method hint.
2434 INFO: hint syntax error at or near "IndexScan(t1)SeqScan(t1)"
2435 DETAIL: Conflict scan method hint.
2447 ------------------------------------------------
2449 Filter: ((c1 = 1) AND (ctid = '(1,1)'::tid))
2453 /*+Set(enable_indexscan enable)*/
2454 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2455 INFO: parameter "enable_indexscan" requires a Boolean value
2461 Set(enable_indexscan enable)
2464 ------------------------------
2465 Index Scan using t1_i1 on t1
2466 Index Cond: (c1 = 1)
2470 ---- No. A-10-1 hint state output
2472 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2473 EXPLAIN (COSTS false) EXECUTE p1;
2475 ------------------------------
2476 Index Scan using t1_i1 on t1
2477 Index Cond: (c1 = 1)
2481 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2482 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2484 ---------------------
2489 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2491 ---------------------
2496 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2498 ---------------------
2503 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2505 ---------------------
2510 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2512 ---------------------
2517 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2519 ---------------------
2528 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2537 EXPLAIN (COSTS false) EXECUTE p1;
2539 --------------------
2544 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2546 EXPLAIN (COSTS false) EXECUTE p1;
2555 --------------------
2562 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2571 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2573 ----------------------------------
2574 Bitmap Heap Scan on t1
2575 Recheck Cond: (c1 < $1)
2576 -> Bitmap Index Scan on t1_i1
2577 Index Cond: (c1 < $1)
2581 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2583 ----------------------------------
2584 Bitmap Heap Scan on t1
2585 Recheck Cond: (c1 < $1)
2586 -> Bitmap Index Scan on t1_i1
2587 Index Cond: (c1 < $1)
2591 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2593 ----------------------------------
2594 Bitmap Heap Scan on t1
2595 Recheck Cond: (c1 < $1)
2596 -> Bitmap Index Scan on t1_i1
2597 Index Cond: (c1 < $1)
2601 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2603 ----------------------------------
2604 Bitmap Heap Scan on t1
2605 Recheck Cond: (c1 < $1)
2606 -> Bitmap Index Scan on t1_i1
2607 Index Cond: (c1 < $1)
2611 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2613 ----------------------------------
2614 Bitmap Heap Scan on t1
2615 Recheck Cond: (c1 < $1)
2616 -> Bitmap Index Scan on t1_i1
2617 Index Cond: (c1 < $1)
2621 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2623 ----------------------------------
2624 Bitmap Heap Scan on t1
2625 Recheck Cond: (c1 < $1)
2626 -> Bitmap Index Scan on t1_i1
2627 Index Cond: (c1 < $1)
2630 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2632 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2641 ----------------------------------
2642 Bitmap Heap Scan on t1
2643 Recheck Cond: (c1 < $1)
2644 -> Bitmap Index Scan on t1_i1
2645 Index Cond: (c1 < $1)
2652 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2660 EXPLAIN (COSTS false) EXECUTE p1;
2662 --------------------
2667 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2668 EXPLAIN (COSTS false) EXECUTE p1;
2677 --------------------
2684 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2692 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2694 ----------------------------------
2695 Bitmap Heap Scan on t1
2696 Recheck Cond: (c1 < $1)
2697 -> Bitmap Index Scan on t1_i1
2698 Index Cond: (c1 < $1)
2701 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2703 ----------------------------------
2704 Bitmap Heap Scan on t1
2705 Recheck Cond: (c1 < $1)
2706 -> Bitmap Index Scan on t1_i1
2707 Index Cond: (c1 < $1)
2710 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2712 ----------------------------------
2713 Bitmap Heap Scan on t1
2714 Recheck Cond: (c1 < $1)
2715 -> Bitmap Index Scan on t1_i1
2716 Index Cond: (c1 < $1)
2719 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2721 ----------------------------------
2722 Bitmap Heap Scan on t1
2723 Recheck Cond: (c1 < $1)
2724 -> Bitmap Index Scan on t1_i1
2725 Index Cond: (c1 < $1)
2728 EXPLAIN (COSTS false) 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 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2739 ----------------------------------
2740 Bitmap Heap Scan on t1
2741 Recheck Cond: (c1 < $1)
2742 -> Bitmap Index Scan on t1_i1
2743 Index Cond: (c1 < $1)
2746 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2747 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2756 ----------------------------------
2757 Bitmap Heap Scan on t1
2758 Recheck Cond: (c1 < $1)
2759 -> Bitmap Index Scan on t1_i1
2760 Index Cond: (c1 < $1)
2766 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2768 EXPLAIN (COSTS false) EXECUTE p1;
2770 ------------------------------
2771 Index Scan using t1_i1 on t1
2772 Index Cond: (c1 = 1)
2775 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2777 EXPLAIN (COSTS false) EXECUTE p1;
2779 ------------------------------
2780 Index Scan using t1_i1 on t1
2781 Index Cond: (c1 = 1)
2785 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2787 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2789 ---------------------
2794 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2796 ---------------------
2801 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2803 ---------------------
2808 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2810 ---------------------
2815 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2817 ---------------------
2822 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2824 ---------------------
2829 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2831 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2833 ---------------------
2842 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2851 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2853 --------------------
2858 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2860 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2869 --------------------
2876 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2885 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2887 ----------------------------------
2888 Bitmap Heap Scan on t1
2889 Recheck Cond: (c1 < $1)
2890 -> Bitmap Index Scan on t1_i1
2891 Index Cond: (c1 < $1)
2895 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2897 ----------------------------------
2898 Bitmap Heap Scan on t1
2899 Recheck Cond: (c1 < $1)
2900 -> Bitmap Index Scan on t1_i1
2901 Index Cond: (c1 < $1)
2905 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2907 ----------------------------------
2908 Bitmap Heap Scan on t1
2909 Recheck Cond: (c1 < $1)
2910 -> Bitmap Index Scan on t1_i1
2911 Index Cond: (c1 < $1)
2915 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2917 ----------------------------------
2918 Bitmap Heap Scan on t1
2919 Recheck Cond: (c1 < $1)
2920 -> Bitmap Index Scan on t1_i1
2921 Index Cond: (c1 < $1)
2925 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2927 ----------------------------------
2928 Bitmap Heap Scan on t1
2929 Recheck Cond: (c1 < $1)
2930 -> Bitmap Index Scan on t1_i1
2931 Index Cond: (c1 < $1)
2935 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2937 ----------------------------------
2938 Bitmap Heap Scan on t1
2939 Recheck Cond: (c1 < $1)
2940 -> Bitmap Index Scan on t1_i1
2941 Index Cond: (c1 < $1)
2944 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2946 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2955 ----------------------------------
2956 Bitmap Heap Scan on t1
2957 Recheck Cond: (c1 < $1)
2958 -> Bitmap Index Scan on t1_i1
2959 Index Cond: (c1 < $1)
2966 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2974 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2976 --------------------
2981 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2982 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2991 --------------------
2998 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
3006 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3008 ----------------------------------
3009 Bitmap Heap Scan on t1
3010 Recheck Cond: (c1 < $1)
3011 -> Bitmap Index Scan on t1_i1
3012 Index Cond: (c1 < $1)
3015 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3017 ----------------------------------
3018 Bitmap Heap Scan on t1
3019 Recheck Cond: (c1 < $1)
3020 -> Bitmap Index Scan on t1_i1
3021 Index Cond: (c1 < $1)
3024 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3026 ----------------------------------
3027 Bitmap Heap Scan on t1
3028 Recheck Cond: (c1 < $1)
3029 -> Bitmap Index Scan on t1_i1
3030 Index Cond: (c1 < $1)
3033 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3035 ----------------------------------
3036 Bitmap Heap Scan on t1
3037 Recheck Cond: (c1 < $1)
3038 -> Bitmap Index Scan on t1_i1
3039 Index Cond: (c1 < $1)
3042 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3044 ----------------------------------
3045 Bitmap Heap Scan on t1
3046 Recheck Cond: (c1 < $1)
3047 -> Bitmap Index Scan on t1_i1
3048 Index Cond: (c1 < $1)
3051 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3053 ----------------------------------
3054 Bitmap Heap Scan on t1
3055 Recheck Cond: (c1 < $1)
3056 -> Bitmap Index Scan on t1_i1
3057 Index Cond: (c1 < $1)
3060 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
3061 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3070 ----------------------------------
3071 Bitmap Heap Scan on t1
3072 Recheck Cond: (c1 < $1)
3073 -> Bitmap Index Scan on t1_i1
3074 Index Cond: (c1 < $1)
3080 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3082 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
3084 ------------------------------
3085 Index Scan using t1_i1 on t1
3086 Index Cond: (c1 = 1)
3089 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
3091 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
3093 ------------------------------
3094 Index Scan using t1_i1 on t1
3095 Index Cond: (c1 = 1)
3099 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
3101 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3103 ---------------------
3109 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3111 ---------------------
3117 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3119 ---------------------
3125 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3127 ---------------------
3133 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3135 ---------------------
3141 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3143 ---------------------
3148 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
3150 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3152 ---------------------
3159 ---- No. A-10-4 EXECUTE statement name error
3163 ERROR: prepared statement "p1" does not exist
3164 SHOW pg_hint_plan.debug_print;
3165 pg_hint_plan.debug_print
3166 --------------------------
3171 ---- No. A-11-5 EXECUTE statement name error
3174 SELECT pg_stat_statements_reset();
3175 pg_stat_statements_reset
3176 --------------------------
3180 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3186 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3189 Set(enable_seqscan off)
3199 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3212 SELECT s.query, s.calls
3213 FROM public.pg_stat_statements s
3214 JOIN pg_catalog.pg_database d
3218 -------------------------------------------------------------------+-------
3219 SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3220 SELECT pg_stat_statements_reset(); | 1
3221 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3222 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3226 ---- No. A-12-1 reset of global variable of core at the error
3227 ---- No. A-12-2 reset of global variable of original at the error
3229 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3231 ------------------------------------
3233 Merge Cond: (t1.c1 = t2.c1)
3234 -> Index Scan using t1_i1 on t1
3240 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3241 PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3242 INFO: hint syntax error at or near "NestLoop(t1 t1)"
3243 DETAIL: Relation name "t1" is duplicated.
3248 Set(enable_seqscan off)
3249 Set(geqo_threshold 100)
3255 EXPLAIN (COSTS false) EXECUTE p1;
3257 ------------------------------------
3259 Merge Cond: (t1.c1 = t2.c1)
3263 -> Index Scan using t2_i1 on t2
3268 SELECT name, setting FROM settings;
3270 ---------------------------+-----------
3273 geqo_generations | 0
3276 geqo_selection_bias | 2
3278 constraint_exclusion | partition
3279 cursor_tuple_fraction | 0.1
3280 default_statistics_target | 100
3281 from_collapse_limit | 8
3282 join_collapse_limit | 8
3283 cpu_index_tuple_cost | 0.005
3284 cpu_operator_cost | 0.0025
3285 cpu_tuple_cost | 0.01
3286 effective_cache_size | 16384
3287 random_page_cost | 4
3289 enable_bitmapscan | on
3291 enable_hashjoin | on
3292 enable_indexscan | on
3293 enable_material | on
3294 enable_mergejoin | on
3295 enable_nestloop | on
3299 client_min_messages | log
3302 SET pg_hint_plan.parse_messages TO error;
3303 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3304 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3305 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3306 DETAIL: Relation name "t1" is duplicated.
3307 SELECT name, setting FROM settings;
3309 ---------------------------+-----------
3312 geqo_generations | 0
3315 geqo_selection_bias | 2
3317 constraint_exclusion | partition
3318 cursor_tuple_fraction | 0.1
3319 default_statistics_target | 100
3320 from_collapse_limit | 8
3321 join_collapse_limit | 8
3322 cpu_index_tuple_cost | 0.005
3323 cpu_operator_cost | 0.0025
3324 cpu_tuple_cost | 0.01
3325 effective_cache_size | 16384
3326 random_page_cost | 4
3328 enable_bitmapscan | on
3330 enable_hashjoin | on
3331 enable_indexscan | on
3332 enable_material | on
3333 enable_mergejoin | on
3334 enable_nestloop | on
3338 client_min_messages | log
3341 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3342 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3347 Set(enable_seqscan off)
3348 Set(geqo_threshold 100)
3354 ------------------------------------
3356 Merge Cond: (t1.c1 = t2.c1)
3360 -> Index Scan using t2_i1 on t2
3365 SELECT name, setting FROM settings;
3367 ---------------------------+-----------
3370 geqo_generations | 0
3373 geqo_selection_bias | 2
3375 constraint_exclusion | partition
3376 cursor_tuple_fraction | 0.1
3377 default_statistics_target | 100
3378 from_collapse_limit | 8
3379 join_collapse_limit | 8
3380 cpu_index_tuple_cost | 0.005
3381 cpu_operator_cost | 0.0025
3382 cpu_tuple_cost | 0.01
3383 effective_cache_size | 16384
3384 random_page_cost | 4
3386 enable_bitmapscan | on
3388 enable_hashjoin | on
3389 enable_indexscan | on
3390 enable_material | on
3391 enable_mergejoin | on
3392 enable_nestloop | on
3396 client_min_messages | log
3399 SET pg_hint_plan.parse_messages TO error;
3400 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3401 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3402 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3403 DETAIL: Relation name "t1" is duplicated.
3404 SELECT name, setting FROM settings;
3406 ---------------------------+-----------
3409 geqo_generations | 0
3412 geqo_selection_bias | 2
3414 constraint_exclusion | partition
3415 cursor_tuple_fraction | 0.1
3416 default_statistics_target | 100
3417 from_collapse_limit | 8
3418 join_collapse_limit | 8
3419 cpu_index_tuple_cost | 0.005
3420 cpu_operator_cost | 0.0025
3421 cpu_tuple_cost | 0.01
3422 effective_cache_size | 16384
3423 random_page_cost | 4
3425 enable_bitmapscan | on
3427 enable_hashjoin | on
3428 enable_indexscan | on
3429 enable_material | on
3430 enable_mergejoin | on
3431 enable_nestloop | on
3435 client_min_messages | log
3438 EXPLAIN (COSTS false) EXECUTE p1;
3440 ------------------------------------
3442 Merge Cond: (t1.c1 = t2.c1)
3446 -> Index Scan using t2_i1 on t2
3451 SELECT name, setting FROM settings;
3453 ---------------------------+-----------
3456 geqo_generations | 0
3459 geqo_selection_bias | 2
3461 constraint_exclusion | partition
3462 cursor_tuple_fraction | 0.1
3463 default_statistics_target | 100
3464 from_collapse_limit | 8
3465 join_collapse_limit | 8
3466 cpu_index_tuple_cost | 0.005
3467 cpu_operator_cost | 0.0025
3468 cpu_tuple_cost | 0.01
3469 effective_cache_size | 16384
3470 random_page_cost | 4
3472 enable_bitmapscan | on
3474 enable_hashjoin | on
3475 enable_indexscan | on
3476 enable_material | on
3477 enable_mergejoin | on
3478 enable_nestloop | on
3482 client_min_messages | log
3485 SET pg_hint_plan.parse_messages TO error;
3486 EXPLAIN (COSTS false) EXECUTE p2;
3487 ERROR: prepared statement "p2" does not exist
3488 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3489 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3494 Set(enable_seqscan off)
3495 Set(geqo_threshold 100)
3501 ------------------------------------
3503 Merge Cond: (t1.c1 = t2.c1)
3507 -> Index Scan using t2_i1 on t2
3510 EXPLAIN (COSTS false) EXECUTE p1;
3512 ------------------------------------
3514 Merge Cond: (t1.c1 = t2.c1)
3518 -> Index Scan using t2_i1 on t2
3521 SELECT name, setting FROM settings;
3523 ---------------------------+-----------
3526 geqo_generations | 0
3529 geqo_selection_bias | 2
3531 constraint_exclusion | partition
3532 cursor_tuple_fraction | 0.1
3533 default_statistics_target | 100
3534 from_collapse_limit | 8
3535 join_collapse_limit | 8
3536 cpu_index_tuple_cost | 0.005
3537 cpu_operator_cost | 0.0025
3538 cpu_tuple_cost | 0.01
3539 effective_cache_size | 16384
3540 random_page_cost | 4
3542 enable_bitmapscan | on
3544 enable_hashjoin | on
3545 enable_indexscan | on
3546 enable_material | on
3547 enable_mergejoin | on
3548 enable_nestloop | on
3552 client_min_messages | log
3557 SELECT name, setting FROM settings;
3559 ---------------------------+-----------
3562 geqo_generations | 0
3565 geqo_selection_bias | 2
3567 constraint_exclusion | partition
3568 cursor_tuple_fraction | 0.1
3569 default_statistics_target | 100
3570 from_collapse_limit | 8
3571 join_collapse_limit | 8
3572 cpu_index_tuple_cost | 0.005
3573 cpu_operator_cost | 0.0025
3574 cpu_tuple_cost | 0.01
3575 effective_cache_size | 16384
3576 random_page_cost | 4
3578 enable_bitmapscan | on
3580 enable_hashjoin | on
3581 enable_indexscan | on
3582 enable_material | on
3583 enable_mergejoin | on
3584 enable_nestloop | on
3588 client_min_messages | log
3591 SET pg_hint_plan.parse_messages TO error;
3592 EXPLAIN (COSTS false) EXECUTE p2;
3593 ERROR: prepared statement "p2" does not exist
3594 EXPLAIN (COSTS false) EXECUTE p1;
3596 ------------------------------------
3598 Merge Cond: (t1.c1 = t2.c1)
3602 -> Index Scan using t2_i1 on t2
3605 SELECT name, setting FROM settings;
3607 ---------------------------+-----------
3610 geqo_generations | 0
3613 geqo_selection_bias | 2
3615 constraint_exclusion | partition
3616 cursor_tuple_fraction | 0.1
3617 default_statistics_target | 100
3618 from_collapse_limit | 8
3619 join_collapse_limit | 8
3620 cpu_index_tuple_cost | 0.005
3621 cpu_operator_cost | 0.0025
3622 cpu_tuple_cost | 0.01
3623 effective_cache_size | 16384
3624 random_page_cost | 4
3626 enable_bitmapscan | on
3628 enable_hashjoin | on
3629 enable_indexscan | on
3630 enable_material | on
3631 enable_mergejoin | on
3632 enable_nestloop | on
3636 client_min_messages | log
3640 SET pg_hint_plan.parse_messages TO LOG;
3642 ---- No. A-12-3 effective range of the hint
3644 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3646 ------------------------------------
3648 Merge Cond: (t1.c1 = t2.c1)
3649 -> Index Scan using t1_i1 on t1
3656 SET enable_indexscan TO off;
3657 SET enable_mergejoin TO off;
3658 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3660 ------------------------------
3662 Hash Cond: (t1.c1 = t2.c1)
3668 SELECT name, setting FROM settings;
3670 ---------------------------+-----------
3673 geqo_generations | 0
3676 geqo_selection_bias | 2
3678 constraint_exclusion | partition
3679 cursor_tuple_fraction | 0.1
3680 default_statistics_target | 100
3681 from_collapse_limit | 8
3682 join_collapse_limit | 8
3683 cpu_index_tuple_cost | 0.005
3684 cpu_operator_cost | 0.0025
3685 cpu_tuple_cost | 0.01
3686 effective_cache_size | 16384
3687 random_page_cost | 4
3689 enable_bitmapscan | on
3691 enable_hashjoin | on
3692 enable_indexscan | off
3693 enable_material | on
3694 enable_mergejoin | off
3695 enable_nestloop | on
3699 client_min_messages | log
3702 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3703 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3709 Set(enable_indexscan on)
3710 Set(geqo_threshold 100)
3716 ------------------------------------
3718 Merge Cond: (t1.c1 = t2.c1)
3719 -> Index Scan using t1_i1 on t1
3720 -> Index Scan using t2_i1 on t2
3723 SELECT name, setting FROM settings;
3725 ---------------------------+-----------
3728 geqo_generations | 0
3731 geqo_selection_bias | 2
3733 constraint_exclusion | partition
3734 cursor_tuple_fraction | 0.1
3735 default_statistics_target | 100
3736 from_collapse_limit | 8
3737 join_collapse_limit | 8
3738 cpu_index_tuple_cost | 0.005
3739 cpu_operator_cost | 0.0025
3740 cpu_tuple_cost | 0.01
3741 effective_cache_size | 16384
3742 random_page_cost | 4
3744 enable_bitmapscan | on
3746 enable_hashjoin | on
3747 enable_indexscan | off
3748 enable_material | on
3749 enable_mergejoin | off
3750 enable_nestloop | on
3754 client_min_messages | log
3757 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3759 ------------------------------
3761 Hash Cond: (t1.c1 = t2.c1)
3768 SET enable_indexscan TO off;
3769 SET enable_mergejoin TO off;
3770 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3772 ------------------------------
3774 Hash Cond: (t1.c1 = t2.c1)
3780 SELECT name, setting FROM settings;
3782 ---------------------------+-----------
3785 geqo_generations | 0
3788 geqo_selection_bias | 2
3790 constraint_exclusion | partition
3791 cursor_tuple_fraction | 0.1
3792 default_statistics_target | 100
3793 from_collapse_limit | 8
3794 join_collapse_limit | 8
3795 cpu_index_tuple_cost | 0.005
3796 cpu_operator_cost | 0.0025
3797 cpu_tuple_cost | 0.01
3798 effective_cache_size | 16384
3799 random_page_cost | 4
3801 enable_bitmapscan | on
3803 enable_hashjoin | on
3804 enable_indexscan | off
3805 enable_material | on
3806 enable_mergejoin | off
3807 enable_nestloop | on
3811 client_min_messages | log
3815 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3816 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3822 Set(enable_indexscan on)
3823 Set(geqo_threshold 100)
3829 ------------------------------------
3831 Merge Cond: (t1.c1 = t2.c1)
3832 -> Index Scan using t1_i1 on t1
3833 -> Index Scan using t2_i1 on t2
3838 SELECT name, setting FROM settings;
3840 ---------------------------+-----------
3843 geqo_generations | 0
3846 geqo_selection_bias | 2
3848 constraint_exclusion | partition
3849 cursor_tuple_fraction | 0.1
3850 default_statistics_target | 100
3851 from_collapse_limit | 8
3852 join_collapse_limit | 8
3853 cpu_index_tuple_cost | 0.005
3854 cpu_operator_cost | 0.0025
3855 cpu_tuple_cost | 0.01
3856 effective_cache_size | 16384
3857 random_page_cost | 4
3859 enable_bitmapscan | on
3861 enable_hashjoin | on
3862 enable_indexscan | off
3863 enable_material | on
3864 enable_mergejoin | off
3865 enable_nestloop | on
3869 client_min_messages | log
3872 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3874 ------------------------------
3876 Hash Cond: (t1.c1 = t2.c1)
3884 SET enable_indexscan TO off;
3885 SET enable_mergejoin TO off;
3886 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3888 ------------------------------
3890 Hash Cond: (t1.c1 = t2.c1)
3896 SELECT name, setting FROM settings;
3898 ---------------------------+-----------
3901 geqo_generations | 0
3904 geqo_selection_bias | 2
3906 constraint_exclusion | partition
3907 cursor_tuple_fraction | 0.1
3908 default_statistics_target | 100
3909 from_collapse_limit | 8
3910 join_collapse_limit | 8
3911 cpu_index_tuple_cost | 0.005
3912 cpu_operator_cost | 0.0025
3913 cpu_tuple_cost | 0.01
3914 effective_cache_size | 16384
3915 random_page_cost | 4
3917 enable_bitmapscan | on
3919 enable_hashjoin | on
3920 enable_indexscan | off
3921 enable_material | on
3922 enable_mergejoin | off
3923 enable_nestloop | on
3927 client_min_messages | log
3930 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3931 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3937 Set(enable_indexscan on)
3938 Set(geqo_threshold 100)
3944 ------------------------------------
3946 Merge Cond: (t1.c1 = t2.c1)
3947 -> Index Scan using t1_i1 on t1
3948 -> Index Scan using t2_i1 on t2
3952 SET enable_indexscan TO off;
3953 SET enable_mergejoin TO off;
3954 LOAD 'pg_hint_plan';
3955 SELECT name, setting FROM settings;
3957 ---------------------------+-----------
3960 geqo_generations | 0
3963 geqo_selection_bias | 2
3965 constraint_exclusion | partition
3966 cursor_tuple_fraction | 0.1
3967 default_statistics_target | 100
3968 from_collapse_limit | 8
3969 join_collapse_limit | 8
3970 cpu_index_tuple_cost | 0.005
3971 cpu_operator_cost | 0.0025
3972 cpu_tuple_cost | 0.01
3973 effective_cache_size | 16384
3974 random_page_cost | 4
3976 enable_bitmapscan | on
3978 enable_hashjoin | on
3979 enable_indexscan | off
3980 enable_material | on
3981 enable_mergejoin | off
3982 enable_nestloop | on
3986 client_min_messages | notice
3989 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3991 ------------------------------
3993 Hash Cond: (t1.c1 = t2.c1)
3999 SET pg_hint_plan.enable_hint TO on;
4000 SET pg_hint_plan.debug_print TO on;
4001 SET client_min_messages TO LOG;
4002 SET search_path TO public;
4003 RESET enable_indexscan;
4004 RESET enable_mergejoin;
4006 ---- No. A-13 call planner recursively
4008 CREATE OR REPLACE FUNCTION nested_planner(cnt int) RETURNS int AS $$
4012 RAISE NOTICE 'nested_planner(%)', cnt;
4019 SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) INTO new_cnt
4021 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4022 ORDER BY t_1.c1 LIMIT 1;
4026 $$ LANGUAGE plpgsql IMMUTABLE;
4028 ---- No. A-13-2 use hint of main query
4031 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4032 NOTICE: nested_planner(1)
4034 ----------------------------------
4035 Index Scan using t1_i1 on t1 t_1
4039 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4040 NOTICE: nested_planner(1)
4049 --------------------------
4052 -> Seq Scan on t1 t_1
4056 ---- No. A-13-3 output number of times of debugging log
4059 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4060 NOTICE: nested_planner(1)
4062 ----------------------------------
4063 Index Scan using t1_i1 on t1 t_1
4067 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4068 NOTICE: nested_planner(1)
4077 ----------------------------------
4078 Index Scan using t1_i1 on t1 t_1
4082 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
4083 NOTICE: nested_planner(2)
4091 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4092 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4093 ORDER BY t_1.c1 LIMIT 1"
4094 PL/pgSQL function "nested_planner" line 12 at SQL statement
4095 NOTICE: nested_planner(1)
4096 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4097 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4098 ORDER BY t_1.c1 LIMIT 1"
4099 PL/pgSQL function "nested_planner" line 12 at SQL statement
4101 ----------------------------------
4102 Index Scan using t1_i1 on t1 t_1
4106 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
4107 NOTICE: nested_planner(2)
4108 NOTICE: nested_planner(1)
4109 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4110 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4111 ORDER BY t_1.c1 LIMIT 1"
4112 PL/pgSQL function "nested_planner" line 12 at SQL statement
4121 ----------------------------------
4122 Index Scan using t1_i1 on t1 t_1
4126 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
4127 NOTICE: nested_planner(5)
4128 NOTICE: nested_planner(4)
4129 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4130 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4131 ORDER BY t_1.c1 LIMIT 1"
4132 PL/pgSQL function "nested_planner" line 12 at SQL statement
4133 NOTICE: nested_planner(3)
4134 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4135 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4136 ORDER BY t_1.c1 LIMIT 1"
4137 PL/pgSQL function "nested_planner" line 12 at SQL statement
4138 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4139 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4140 ORDER BY t_1.c1 LIMIT 1"
4141 PL/pgSQL function "nested_planner" line 12 at SQL statement
4142 NOTICE: nested_planner(2)
4143 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4144 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4145 ORDER BY t_1.c1 LIMIT 1"
4146 PL/pgSQL function "nested_planner" line 12 at SQL statement
4147 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4148 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4149 ORDER BY t_1.c1 LIMIT 1"
4150 PL/pgSQL function "nested_planner" line 12 at SQL statement
4151 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4152 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4153 ORDER BY t_1.c1 LIMIT 1"
4154 PL/pgSQL function "nested_planner" line 12 at SQL statement
4155 NOTICE: nested_planner(1)
4156 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4157 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4158 ORDER BY t_1.c1 LIMIT 1"
4159 PL/pgSQL function "nested_planner" line 12 at SQL statement
4160 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4161 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4162 ORDER BY t_1.c1 LIMIT 1"
4163 PL/pgSQL function "nested_planner" line 12 at SQL statement
4164 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4165 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4166 ORDER BY t_1.c1 LIMIT 1"
4167 PL/pgSQL function "nested_planner" line 12 at SQL statement
4168 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4169 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4170 ORDER BY t_1.c1 LIMIT 1"
4171 PL/pgSQL function "nested_planner" line 12 at SQL statement
4173 ----------------------------------
4174 Index Scan using t1_i1 on t1 t_1
4178 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
4179 NOTICE: nested_planner(5)
4180 NOTICE: nested_planner(4)
4181 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4182 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4183 ORDER BY t_1.c1 LIMIT 1"
4184 PL/pgSQL function "nested_planner" line 12 at SQL statement
4185 NOTICE: nested_planner(3)
4186 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4187 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4188 ORDER BY t_1.c1 LIMIT 1"
4189 PL/pgSQL function "nested_planner" line 12 at SQL statement
4190 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4191 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4192 ORDER BY t_1.c1 LIMIT 1"
4193 PL/pgSQL function "nested_planner" line 12 at SQL statement
4194 NOTICE: nested_planner(2)
4195 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4196 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4197 ORDER BY t_1.c1 LIMIT 1"
4198 PL/pgSQL function "nested_planner" line 12 at SQL statement
4199 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4200 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4201 ORDER BY t_1.c1 LIMIT 1"
4202 PL/pgSQL function "nested_planner" line 12 at SQL statement
4203 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4204 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4205 ORDER BY t_1.c1 LIMIT 1"
4206 PL/pgSQL function "nested_planner" line 12 at SQL statement
4207 NOTICE: nested_planner(1)
4208 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4209 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4210 ORDER BY t_1.c1 LIMIT 1"
4211 PL/pgSQL function "nested_planner" line 12 at SQL statement
4212 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4213 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4214 ORDER BY t_1.c1 LIMIT 1"
4215 PL/pgSQL function "nested_planner" line 12 at SQL statement
4216 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4217 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4218 ORDER BY t_1.c1 LIMIT 1"
4219 PL/pgSQL function "nested_planner" line 12 at SQL statement
4220 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4221 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4222 ORDER BY t_1.c1 LIMIT 1"
4223 PL/pgSQL function "nested_planner" line 12 at SQL statement
4232 ----------------------------------
4233 Index Scan using t1_i1 on t1 t_1
4237 ---- No. A-13-4 output of debugging log on hint status
4239 CREATE OR REPLACE FUNCTION recall_planner() RETURNS int AS $$
4240 SELECT /*+ IndexScan(t_1) */t_1.c1
4242 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4243 ORDER BY t_1.c1 LIMIT 1;
4244 $$ LANGUAGE SQL IMMUTABLE;
4246 /*+HashJoin(t_1 t_2)*/
4247 EXPLAIN (COSTS false)
4248 SELECT recall_planner() FROM s1.t1 t_1
4249 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4258 CONTEXT: SQL function "recall_planner" during startup
4267 --------------------------------------
4271 Hash Cond: (t_1.c1 = t_2.c1)
4272 -> Seq Scan on t1 t_1
4274 -> Seq Scan on t2 t_2
4278 /*+HashJoin(st_1 st_2)*/
4279 EXPLAIN (COSTS false)
4280 SELECT recall_planner() FROM s1.t1 st_1
4281 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4290 CONTEXT: SQL function "recall_planner" during startup
4299 ----------------------------------------
4303 Hash Cond: (st_1.c1 = st_2.c1)
4304 -> Seq Scan on t1 st_1
4306 -> Seq Scan on t2 st_2
4310 /*+HashJoin(t_1 t_2)*/
4311 EXPLAIN (COSTS false)
4312 SELECT recall_planner() FROM s1.t1 st_1
4313 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4322 CONTEXT: SQL function "recall_planner" during startup
4331 -----------------------------------------
4333 Merge Cond: (st_1.c1 = st_2.c1)
4334 -> Index Scan using t1_i1 on t1 st_1
4337 -> Seq Scan on t2 st_2
4341 /*+HashJoin(st_1 st_2)*/
4342 EXPLAIN (COSTS false)
4343 SELECT recall_planner() FROM s1.t1 t_1
4344 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4353 CONTEXT: SQL function "recall_planner" during startup
4362 ----------------------------------------
4364 Merge Cond: (t_1.c1 = t_2.c1)
4365 -> Index Scan using t1_i1 on t1 t_1
4368 -> Seq Scan on t2 t_2
4372 /*+HashJoin(t_1 t_1)*/
4373 EXPLAIN (COSTS false)
4374 SELECT recall_planner() FROM s1.t1 t_1
4376 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4377 DETAIL: Relation name "t_1" is duplicated.
4378 CONTEXT: SQL function "recall_planner" during startup
4386 CONTEXT: SQL function "recall_planner" during startup
4395 ----------------------------------
4396 Index Scan using t1_i1 on t1 t_1
4400 CREATE OR REPLACE FUNCTION recall_planner_one_t() RETURNS int AS $$
4401 SELECT /*+ IndexScan(t_1) */t_1.c1
4403 ORDER BY t_1.c1 LIMIT 1;
4404 $$ LANGUAGE SQL IMMUTABLE;
4405 EXPLAIN (COSTS false)
4406 SELECT recall_planner_one_t() FROM s1.t1 t_1
4407 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4410 ----------------------------------------
4412 Merge Cond: (t_1.c1 = t_2.c1)
4413 -> Index Scan using t1_i1 on t1 t_1
4416 -> Seq Scan on t2 t_2
4419 /*+HashJoin(t_1 t_1)*/
4420 EXPLAIN (COSTS false)
4421 SELECT recall_planner_one_t() FROM s1.t1 t_1
4422 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4431 CONTEXT: SQL function "recall_planner_one_t" during startup
4432 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4433 DETAIL: Relation name "t_1" is duplicated.
4442 ----------------------------------------
4444 Merge Cond: (t_1.c1 = t_2.c1)
4445 -> Index Scan using t1_i1 on t1 t_1
4448 -> Seq Scan on t2 t_2
4451 DROP FUNCTION recall_planner_one_t(int);
4452 ERROR: function recall_planner_one_t(integer) does not exist
4454 /*+HashJoin(t_1 t_1)*/
4455 EXPLAIN (COSTS false)
4456 SELECT recall_planner() FROM s1.t1 t_1
4457 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4459 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4460 DETAIL: Relation name "t_1" is duplicated.
4461 CONTEXT: SQL function "recall_planner" during startup
4469 CONTEXT: SQL function "recall_planner" during startup
4470 INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4471 DETAIL: Relation name "t_1" is duplicated.
4480 ----------------------------------------
4482 Merge Cond: (t_1.c1 = t_2.c1)
4483 -> Index Scan using t1_i1 on t1 t_1
4486 -> Seq Scan on t2 t_2
4490 /*+MergeJoin(t_1 t_2)HashJoin(t_1 t_2)*/
4491 EXPLAIN (COSTS false)
4492 SELECT recall_planner() FROM s1.t1 t_1
4493 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4495 INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4496 DETAIL: Conflict join method hint.
4497 INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4498 DETAIL: Conflict join method hint.
4499 CONTEXT: SQL function "recall_planner" during startup
4508 CONTEXT: SQL function "recall_planner" during startup
4518 --------------------------------------
4522 Hash Cond: (t_1.c1 = t_2.c1)
4523 -> Seq Scan on t1 t_1
4525 -> Seq Scan on t2 t_2