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 Only 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 Only 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;
197 TRUNCATE hint_plan.hints;
199 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
201 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
202 'dummy_application_name',
205 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
207 ------------------------------
208 Index Scan using t1_i1 on t1
212 TRUNCATE hint_plan.hints;
214 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
216 'EXPLAIN (COSTS false) SELECT * FROM s1.t1;',
220 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
222 ------------------------------
223 Index Scan using t1_i1 on t1
227 TRUNCATE hint_plan.hints;
229 ---- No. A-6-3 number of constant
232 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
234 'EXPLAIN (COSTS false) SELECT c1 FROM s1.t1;',
238 EXPLAIN (COSTS false) SELECT c1 FROM s1.t1;
251 TRUNCATE hint_plan.hints;
253 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
255 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
259 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
273 TRUNCATE hint_plan.hints;
275 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
277 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ? OR t1.c1 = ?;',
281 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 OR t1.c1 = 0;
290 ----------------------------------
292 Filter: ((c1 = 1) OR (c1 = 0))
295 TRUNCATE hint_plan.hints;
296 SET pg_hint_plan.enable_hint_table TO off;
298 ---- No. A-7-2 hint delimiter
300 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
302 ------------------------------
303 Index Scan using t1_i1 on t1
314 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
315 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
318 Set(enable_bitmapscan off)
319 Set(enable_indexscan off)
331 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
332 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
335 Set(enable_bitmapscan off)
336 Set(enable_indexscan off)
348 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
349 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
352 Set(enable_bitmapscan off)
353 Set(enable_indexscan off)
365 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
366 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
369 Set(enable_bitmapscan off)
370 Set(enable_indexscan off)
382 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
383 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
386 Set(enable_bitmapscan off)
387 Set(enable_indexscan off)
399 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
400 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
403 Set(enable_bitmapscan off)
404 Set(enable_indexscan off)
416 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
417 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
420 Set(enable_bitmapscan off)
421 Set(enable_indexscan off)
433 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
434 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
437 Set(enable_bitmapscan off)
438 Set(enable_indexscan off)
450 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
451 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
454 Set(enable_bitmapscan off)
455 Set(enable_indexscan off)
467 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
468 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
471 Set(enable_bitmapscan off)
472 Set(enable_indexscan off)
484 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
485 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
488 Set(enable_bitmapscan off)
489 Set(enable_indexscan off)
501 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
502 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
505 Set(enable_bitmapscan off)
506 Set(enable_indexscan off)
518 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
519 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
522 Set(enable_bitmapscan off)
523 Set(enable_indexscan off)
535 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
536 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
539 Set(enable_bitmapscan off)
540 Set(enable_indexscan off)
552 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
553 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
556 Set(enable_bitmapscan off)
557 Set(enable_indexscan off)
570 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
571 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
574 Set(enable_bitmapscan off)
575 Set(enable_indexscan off)
587 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
589 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
592 Set(enable_bitmapscan off)
593 Set(enable_indexscan off)
607 (enable_indexscan"off")
609 (enable_bitmapscan"off")*/
610 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
613 Set(enable_bitmapscan off)
614 Set(enable_indexscan off)
628 enable_indexscan"off")Set
630 enable_bitmapscan"off")*/
631 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
634 Set(enable_bitmapscan off)
635 Set(enable_indexscan off)
647 /*+Set(enable_indexscan"off"
649 Set(enable_bitmapscan"off"
652 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
655 Set(enable_bitmapscan off)
656 Set(enable_indexscan off)
675 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
678 Set(enable_bitmapscan off)
679 Set(enable_indexscan off)
703 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
706 Set(enable_bitmapscan off)
707 Set(enable_indexscan off)
720 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
721 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
724 Set(enable_bitmapscan off)
725 Set(enable_indexscan off)
737 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
739 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
742 Set(enable_bitmapscan off)
743 Set(enable_indexscan off)
757 (enable_indexscan"off")
759 (enable_bitmapscan"off")*/
760 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
763 Set(enable_bitmapscan off)
764 Set(enable_indexscan off)
778 enable_indexscan"off")Set
780 enable_bitmapscan"off")*/
781 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
784 Set(enable_bitmapscan off)
785 Set(enable_indexscan off)
797 /*+Set(enable_indexscan"off"
799 Set(enable_bitmapscan"off"
802 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
805 Set(enable_bitmapscan off)
806 Set(enable_indexscan off)
825 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
828 Set(enable_bitmapscan off)
829 Set(enable_indexscan off)
853 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
856 Set(enable_bitmapscan off)
857 Set(enable_indexscan off)
869 ---- No. A-7-3 hint object pattern
870 ---- No. A-9-2 message object pattern
875 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
890 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
905 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
920 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
937 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
952 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
961 ----------------------
967 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
982 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
991 ----------------------
999 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
1000 INFO: pg_hint_plan: hint syntax error at or near "()"
1001 DETAIL: Zero-length delimited string.
1003 ----------------------------------
1004 Index Scan using t1_i1 on t1 "("
1005 Index Cond: (c1 = 1)
1009 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
1018 --------------------
1026 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
1027 INFO: pg_hint_plan: hint syntax error at or near ")"
1028 DETAIL: SeqScan hint requires a relation.
1029 INFO: pg_hint_plan: hint syntax error at or near ")"
1030 DETAIL: Unrecognized hint keyword ")".
1039 ----------------------------------
1040 Index Scan using t1_i1 on t1 ")"
1041 Index Cond: (c1 = 1)
1045 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
1054 --------------------
1060 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")))" WHERE ")))".c1 = 1;
1069 ----------------------
1070 Seq Scan on t1 ")))"
1077 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
1078 INFO: pg_hint_plan: hint syntax error at or near ""
1079 DETAIL: Unterminated quoted string.
1081 -----------------------------------
1082 Index Scan using t1_i1 on t1 """"
1083 Index Cond: (c1 = 1)
1087 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
1096 ---------------------
1101 /*+SeqScan("""""""")*/
1102 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """""""" WHERE """""""".c1 = 1;
1111 -------------------------
1112 Seq Scan on t1 """"""""
1119 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1120 INFO: pg_hint_plan: hint syntax error at or near ""
1121 DETAIL: SeqScan hint requires a relation.
1130 ----------------------------------
1131 Index Scan using t1_i1 on t1 " "
1132 Index Cond: (c1 = 1)
1136 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1145 --------------------
1151 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1160 ----------------------
1168 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1169 INFO: pg_hint_plan: hint syntax error at or near ""
1170 DETAIL: SeqScan hint requires a relation.
1179 -----------------------------------
1180 Index Scan using t1_i1 on t1 " "
1181 Index Cond: (c1 = 1)
1185 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1194 ---------------------------
1200 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1209 -------------------------------------------
1218 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1221 INFO: pg_hint_plan: hint syntax error at or near ""
1222 DETAIL: SeqScan hint requires a relation.
1231 --------------------------------
1232 Index Scan using t1_i1 on t1 "
1234 Index Cond: (c1 = 1)
1239 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1251 --------------------
1261 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1279 --------------------
1290 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1299 ----------------------
1300 Seq Scan on t1 "Set"
1305 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1314 ----------------------
1315 Seq Scan on t1 "Set"
1319 /*+SeqScan("Set SeqScan Leading")*/
1320 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set SeqScan Leading" WHERE "Set SeqScan Leading".c1 = 1;
1323 SeqScan("Set SeqScan Leading")
1329 --------------------------------------
1330 Seq Scan on t1 "Set SeqScan Leading"
1337 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1346 ---------------------
1352 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1361 -------------------------
1362 Seq Scan on t1 "あいう"
1367 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1376 ---------------------
1382 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1391 -------------------------
1392 Seq Scan on t1 "あいう"
1399 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;
1400 INFO: pg_hint_plan: hint syntax error at or near "/**/)*/
1401 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;"
1402 DETAIL: Nested block comments are not supported.
1404 -------------------------------------
1405 Index Scan using t1_i1 on t1 "/**/"
1406 Index Cond: (c1 = 1)
1409 /*+SeqScan(/**//**//**/)*/
1410 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;
1411 INFO: pg_hint_plan: hint syntax error at or near "/**//**//**/)*/
1412 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;"
1413 DETAIL: Nested block comments are not supported.
1415 ---------------------------------------------
1416 Index Scan using t1_i1 on t1 "/**//**//**/"
1417 Index Cond: (c1 = 1)
1424 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1425 Set/**/あ" WHERE "tT()""
1427 INFO: pg_hint_plan: hint syntax error at or near "/**/あ")*/
1428 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1429 Set/**/あ" WHERE "tT()""
1431 DETAIL: Nested block comments are not supported.
1433 ------------------------------------------
1434 Index Scan using t1_i1 on t1 "tT()""
1436 Index Cond: (c1 = 1)
1442 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1454 --------------------------
1455 Seq Scan on t1 "tT()""
1462 /*+SeqScan(a123456789b123456789c123456789d123456789e123456789f123)*/
1463 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "123456789012345678901234567890123456789012345678901234" WHERE "123456789012345678901234567890123456789012345678901234".c1 = 1;
1467 SeqScan(a123456789b123456789c123456789d123456789e123456789f123)
1472 ---------------------------------------------------------------------------------------
1473 Index Scan using t1_i1 on t1 "123456789012345678901234567890123456789012345678901234"
1474 Index Cond: (c1 = 1)
1478 ---- No. A-7-4 hint parse error
1481 /*+Set(enable_indexscan off)Set enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1482 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1483 INFO: pg_hint_plan: hint syntax error at or near "enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1484 DETAIL: Opening parenthesis is necessary.
1487 Set(enable_indexscan off)
1493 ----------------------------------
1494 Bitmap Heap Scan on t1
1495 Recheck Cond: (c1 = 1)
1496 -> Bitmap Index Scan on t1_i1
1497 Index Cond: (c1 = 1)
1501 /*+Set(enable_indexscan off)Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)*/
1502 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1503 INFO: pg_hint_plan: hint syntax error at or near "(enable_bitmapscan off)SeqScan(t1)"
1504 DETAIL: Zero-length delimited string.
1507 Set(enable_indexscan off)
1513 ----------------------------------
1514 Bitmap Heap Scan on t1
1515 Recheck Cond: (c1 = 1)
1516 -> Bitmap Index Scan on t1_i1
1517 Index Cond: (c1 = 1)
1521 /*+Set(enable_indexscan off)Set(enable_tidscan "off)Set(enable_bitmapscan off)SeqScan(t1)*/
1522 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1523 INFO: pg_hint_plan: hint syntax error at or near ""
1524 DETAIL: Unterminated quoted string.
1527 Set(enable_indexscan off)
1533 ----------------------------------
1534 Bitmap Heap Scan on t1
1535 Recheck Cond: (c1 = 1)
1536 -> Bitmap Index Scan on t1_i1
1537 Index Cond: (c1 = 1)
1541 /*+Set(enable_indexscan off)SeqScan("")Set(enable_bitmapscan off)*/
1542 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1543 INFO: pg_hint_plan: hint syntax error at or near ")Set(enable_bitmapscan off)"
1544 DETAIL: Zero-length delimited string.
1547 Set(enable_indexscan off)
1553 ----------------------------------
1554 Bitmap Heap Scan on t1
1555 Recheck Cond: (c1 = 1)
1556 -> Bitmap Index Scan on t1_i1
1557 Index Cond: (c1 = 1)
1561 /*+Set(enable_indexscan off)NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1562 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1563 INFO: pg_hint_plan: hint syntax error at or near "NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1564 DETAIL: Unrecognized hint keyword "NoSet".
1567 Set(enable_indexscan off)
1573 ----------------------------------
1574 Bitmap Heap Scan on t1
1575 Recheck Cond: (c1 = 1)
1576 -> Bitmap Index Scan on t1_i1
1577 Index Cond: (c1 = 1)
1581 /*+Set(enable_indexscan off)"Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1582 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1583 INFO: pg_hint_plan: hint syntax error at or near ""Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1584 DETAIL: Unrecognized hint keyword ""Set"".
1587 Set(enable_indexscan off)
1593 ----------------------------------
1594 Bitmap Heap Scan on t1
1595 Recheck Cond: (c1 = 1)
1596 -> Bitmap Index Scan on t1_i1
1597 Index Cond: (c1 = 1)
1601 /*+Set(enable_indexscan off)Set(enable_tidscan /* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1602 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1603 INFO: pg_hint_plan: hint syntax error at or near "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1604 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
1605 DETAIL: Nested block comments are not supported.
1607 ------------------------------
1608 Index Scan using t1_i1 on t1
1609 Index Cond: (c1 = 1)
1613 ---- No. A-8-1 original GUC parameter
1615 ---- Don't test postgresql itself.
1617 -- SET ROLE super_user;
1618 -- SET pg_hint_plan.debug_print TO off;
1619 -- SHOW pg_hint_plan.enable_hint;
1620 -- SHOW pg_hint_plan.debug_print;
1621 -- SHOW pg_hint_plan.parse_messages;
1622 -- SET pg_hint_plan.enable_hint TO off;
1623 -- SET pg_hint_plan.debug_print TO on;
1624 -- SET pg_hint_plan.parse_messages TO error;
1625 -- SHOW pg_hint_plan.enable_hint;
1626 -- SHOW pg_hint_plan.debug_print;
1627 -- SHOW pg_hint_plan.parse_messages;
1628 -- RESET pg_hint_plan.enable_hint;
1629 -- RESET pg_hint_plan.debug_print;
1630 -- RESET pg_hint_plan.parse_messages;
1631 -- SHOW pg_hint_plan.enable_hint;
1632 -- SHOW pg_hint_plan.debug_print;
1633 -- SHOW pg_hint_plan.parse_messages;
1636 -- SET ROLE normal_user;
1637 -- SHOW pg_hint_plan.enable_hint;
1638 -- SHOW pg_hint_plan.debug_print;
1639 -- SHOW pg_hint_plan.parse_messages;
1640 -- SET pg_hint_plan.enable_hint TO off;
1641 -- SET pg_hint_plan.debug_print TO on;
1642 -- SET pg_hint_plan.parse_messages TO error;
1643 -- SHOW pg_hint_plan.enable_hint;
1644 -- SHOW pg_hint_plan.debug_print;
1645 -- SHOW pg_hint_plan.parse_messages;
1646 -- RESET pg_hint_plan.enable_hint;
1647 -- RESET pg_hint_plan.debug_print;
1648 -- RESET pg_hint_plan.parse_messages;
1649 -- SHOW pg_hint_plan.enable_hint;
1650 -- SHOW pg_hint_plan.debug_print;
1651 -- SHOW pg_hint_plan.parse_messages;
1655 ---- No. A-8-2 original GUC parameter pg_hint_plan.enable_hint
1658 SET pg_hint_plan.debug_print TO off;
1659 SET pg_hint_plan.enable_hint TO on;
1660 SHOW pg_hint_plan.enable_hint;
1661 pg_hint_plan.enable_hint
1662 --------------------------
1666 /*+Set(enable_indexscan off)*/
1667 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1669 ----------------------------------
1670 Bitmap Heap Scan on t1
1671 Recheck Cond: (c1 = 1)
1672 -> Bitmap Index Scan on t1_i1
1673 Index Cond: (c1 = 1)
1677 SET pg_hint_plan.enable_hint TO off;
1678 SHOW pg_hint_plan.enable_hint;
1679 pg_hint_plan.enable_hint
1680 --------------------------
1684 /*+Set(enable_indexscan off)*/
1685 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1687 ------------------------------
1688 Index Scan using t1_i1 on t1
1689 Index Cond: (c1 = 1)
1693 -- Don't test PostgreSQL itself.
1694 -- SET pg_hint_plan.enable_hint TO DEFAULT;
1695 -- SHOW pg_hint_plan.enable_hint;
1696 -- /*+Set(enable_indexscan off)*/
1697 -- EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1699 -- Don't test PostgreSQL itself
1700 -- SET pg_hint_plan.enable_hint TO enable;
1701 -- SHOW pg_hint_plan.enable_hint;
1703 ---- No. A-8-3 original GUC parameter pg_hint_plan.debug_print
1706 SET pg_hint_plan.enable_hint TO on;
1707 SHOW pg_hint_plan.enable_hint;
1708 pg_hint_plan.enable_hint
1709 --------------------------
1713 SET pg_hint_plan.debug_print TO on;
1714 SHOW pg_hint_plan.debug_print;
1715 pg_hint_plan.debug_print
1716 --------------------------
1720 /*+Set(enable_indexscan off)*/
1721 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1724 Set(enable_indexscan off)
1730 ----------------------------------
1731 Bitmap Heap Scan on t1
1732 Recheck Cond: (c1 = 1)
1733 -> Bitmap Index Scan on t1_i1
1734 Index Cond: (c1 = 1)
1738 SET pg_hint_plan.debug_print TO off;
1739 SHOW pg_hint_plan.debug_print;
1740 pg_hint_plan.debug_print
1741 --------------------------
1745 /*+Set(enable_indexscan off)*/
1746 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1748 ----------------------------------
1749 Bitmap Heap Scan on t1
1750 Recheck Cond: (c1 = 1)
1751 -> Bitmap Index Scan on t1_i1
1752 Index Cond: (c1 = 1)
1756 SET pg_hint_plan.debug_print TO DEFAULT;
1757 SHOW pg_hint_plan.debug_print;
1758 pg_hint_plan.debug_print
1759 --------------------------
1763 /*+Set(enable_indexscan off)*/
1764 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1766 ----------------------------------
1767 Bitmap Heap Scan on t1
1768 Recheck Cond: (c1 = 1)
1769 -> Bitmap Index Scan on t1_i1
1770 Index Cond: (c1 = 1)
1774 SET pg_hint_plan.debug_print TO enable;
1775 ERROR: invalid value for parameter "pg_hint_plan.debug_print": "enable"
1776 HINT: Available values: off, on, detailed, verbose.
1777 SHOW pg_hint_plan.debug_print;
1778 pg_hint_plan.debug_print
1779 --------------------------
1784 ---- No. A-8-4 original GUC parameter pg_hint_plan.parse_messages
1786 SET client_min_messages TO debug5;
1787 DEBUG: CommitTransactionCommand
1788 DEBUG: CommitTransaction
1789 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1791 SET pg_hint_plan.parse_messages TO debug5;
1792 DEBUG: StartTransactionCommand
1793 DEBUG: StartTransaction
1794 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1795 DEBUG: ProcessUtility
1796 DEBUG: CommitTransactionCommand
1797 DEBUG: CommitTransaction
1798 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1799 SHOW pg_hint_plan.parse_messages;
1800 DEBUG: StartTransactionCommand
1801 DEBUG: StartTransaction
1802 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1803 DEBUG: ProcessUtility
1804 DEBUG: CommitTransactionCommand
1805 DEBUG: CommitTransaction
1806 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1807 pg_hint_plan.parse_messages
1808 -----------------------------
1813 DEBUG: StartTransactionCommand
1814 DEBUG: StartTransaction
1815 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1816 DEBUG: pg_hint_plan: hint syntax error at or near ""
1817 DETAIL: Opening parenthesis is necessary.
1818 DEBUG: CommitTransactionCommand
1819 DEBUG: CommitTransaction
1820 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1826 SET client_min_messages TO debug4;
1827 DEBUG: StartTransactionCommand
1828 DEBUG: StartTransaction
1829 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1830 DEBUG: ProcessUtility
1831 DEBUG: CommitTransactionCommand
1832 DEBUG: CommitTransaction
1833 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1835 DEBUG: StartTransactionCommand
1836 DEBUG: StartTransaction
1837 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1838 DEBUG: CommitTransactionCommand
1839 DEBUG: CommitTransaction
1840 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1847 SET pg_hint_plan.parse_messages TO debug4;
1848 DEBUG: StartTransactionCommand
1849 DEBUG: StartTransaction
1850 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1851 DEBUG: ProcessUtility
1852 DEBUG: CommitTransactionCommand
1853 DEBUG: CommitTransaction
1854 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1855 SHOW pg_hint_plan.parse_messages;
1856 DEBUG: StartTransactionCommand
1857 DEBUG: StartTransaction
1858 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1859 DEBUG: ProcessUtility
1860 DEBUG: CommitTransactionCommand
1861 DEBUG: CommitTransaction
1862 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1863 pg_hint_plan.parse_messages
1864 -----------------------------
1869 DEBUG: StartTransactionCommand
1870 DEBUG: StartTransaction
1871 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1872 DEBUG: pg_hint_plan: hint syntax error at or near ""
1873 DETAIL: Opening parenthesis is necessary.
1874 DEBUG: CommitTransactionCommand
1875 DEBUG: CommitTransaction
1876 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1882 SET client_min_messages TO debug3;
1883 DEBUG: StartTransactionCommand
1884 DEBUG: StartTransaction
1885 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1886 DEBUG: ProcessUtility
1887 DEBUG: CommitTransactionCommand
1888 DEBUG: CommitTransaction
1889 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1891 DEBUG: StartTransactionCommand
1892 DEBUG: StartTransaction
1893 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1894 DEBUG: CommitTransactionCommand
1895 DEBUG: CommitTransaction
1896 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1903 SET pg_hint_plan.parse_messages TO debug3;
1904 DEBUG: StartTransactionCommand
1905 DEBUG: StartTransaction
1906 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1907 DEBUG: ProcessUtility
1908 DEBUG: CommitTransactionCommand
1909 DEBUG: CommitTransaction
1910 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1911 SHOW pg_hint_plan.parse_messages;
1912 DEBUG: StartTransactionCommand
1913 DEBUG: StartTransaction
1914 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1915 DEBUG: ProcessUtility
1916 DEBUG: CommitTransactionCommand
1917 DEBUG: CommitTransaction
1918 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1919 pg_hint_plan.parse_messages
1920 -----------------------------
1925 DEBUG: StartTransactionCommand
1926 DEBUG: StartTransaction
1927 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1928 DEBUG: pg_hint_plan: hint syntax error at or near ""
1929 DETAIL: Opening parenthesis is necessary.
1930 DEBUG: CommitTransactionCommand
1931 DEBUG: CommitTransaction
1932 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1938 SET client_min_messages TO debug2;
1939 DEBUG: StartTransactionCommand
1940 DEBUG: StartTransaction
1941 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1942 DEBUG: ProcessUtility
1950 SET pg_hint_plan.parse_messages TO debug2;
1951 SHOW pg_hint_plan.parse_messages;
1952 pg_hint_plan.parse_messages
1953 -----------------------------
1958 DEBUG: pg_hint_plan: hint syntax error at or near ""
1959 DETAIL: Opening parenthesis is necessary.
1965 SET client_min_messages TO debug1;
1973 SET pg_hint_plan.parse_messages TO debug1;
1974 SHOW pg_hint_plan.parse_messages;
1975 pg_hint_plan.parse_messages
1976 -----------------------------
1981 DEBUG: pg_hint_plan: hint syntax error at or near ""
1982 DETAIL: Opening parenthesis is necessary.
1988 SET client_min_messages TO log;
1996 SET pg_hint_plan.parse_messages TO log;
1997 SHOW pg_hint_plan.parse_messages;
1998 pg_hint_plan.parse_messages
1999 -----------------------------
2004 LOG: pg_hint_plan: hint syntax error at or near ""
2005 DETAIL: Opening parenthesis is necessary.
2011 SET client_min_messages TO info;
2019 SET pg_hint_plan.parse_messages TO info;
2020 SHOW pg_hint_plan.parse_messages;
2021 pg_hint_plan.parse_messages
2022 -----------------------------
2027 INFO: pg_hint_plan: hint syntax error at or near ""
2028 DETAIL: Opening parenthesis is necessary.
2034 SET client_min_messages TO notice;
2036 INFO: pg_hint_plan: hint syntax error at or near ""
2037 DETAIL: Opening parenthesis is necessary.
2044 SET pg_hint_plan.parse_messages TO notice;
2045 SHOW pg_hint_plan.parse_messages;
2046 pg_hint_plan.parse_messages
2047 -----------------------------
2052 NOTICE: pg_hint_plan: hint syntax error at or near ""
2053 DETAIL: Opening parenthesis is necessary.
2059 SET client_min_messages TO warning;
2067 SET pg_hint_plan.parse_messages TO warning;
2068 SHOW pg_hint_plan.parse_messages;
2069 pg_hint_plan.parse_messages
2070 -----------------------------
2075 WARNING: pg_hint_plan: hint syntax error at or near ""
2076 DETAIL: Opening parenthesis is necessary.
2082 SET client_min_messages TO error;
2090 SET pg_hint_plan.parse_messages TO error;
2091 SHOW pg_hint_plan.parse_messages;
2092 pg_hint_plan.parse_messages
2093 -----------------------------
2098 ERROR: pg_hint_plan: hint syntax error at or near ""
2099 DETAIL: Opening parenthesis is necessary.
2100 SET client_min_messages TO fatal;
2103 RESET client_min_messages;
2104 SET pg_hint_plan.parse_messages TO DEFAULT;
2105 SHOW pg_hint_plan.parse_messages;
2106 pg_hint_plan.parse_messages
2107 -----------------------------
2112 INFO: pg_hint_plan: hint syntax error at or near ""
2113 DETAIL: Opening parenthesis is necessary.
2120 SET pg_hint_plan.parse_messages TO fatal;
2121 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "fatal"
2122 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2123 SHOW pg_hint_plan.parse_messages;
2124 pg_hint_plan.parse_messages
2125 -----------------------------
2130 SET pg_hint_plan.parse_messages TO panic;
2131 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "panic"
2132 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2133 SHOW pg_hint_plan.parse_messages;
2134 pg_hint_plan.parse_messages
2135 -----------------------------
2140 SET pg_hint_plan.parse_messages TO on;
2141 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "on"
2142 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2143 SHOW pg_hint_plan.parse_messages;
2144 pg_hint_plan.parse_messages
2145 -----------------------------
2150 ---- No. A-8-5 original GUC parameter pg_hint_plan.enable_hint_table
2152 INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
2154 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
2158 SET pg_hint_plan.enable_hint_table TO on;
2159 SHOW pg_hint_plan.enable_hint_table;
2160 pg_hint_plan.enable_hint_table
2161 --------------------------------
2165 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2167 --------------------
2173 SET pg_hint_plan.enable_hint_table TO off;
2174 SHOW pg_hint_plan.enable_hint_table;
2175 pg_hint_plan.enable_hint_table
2176 --------------------------------
2180 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2182 ------------------------------
2183 Index Scan using t1_i1 on t1
2184 Index Cond: (c1 = 1)
2188 SET pg_hint_plan.enable_hint_table TO DEFAULT;
2189 SHOW pg_hint_plan.enable_hint_table;
2190 pg_hint_plan.enable_hint_table
2191 --------------------------------
2195 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2197 ------------------------------
2198 Index Scan using t1_i1 on t1
2199 Index Cond: (c1 = 1)
2203 SET pg_hint_plan.enable_hint_table TO enable;
2204 ERROR: parameter "pg_hint_plan.enable_hint_table" requires a Boolean value
2205 SHOW pg_hint_plan.enable_hint_table;
2206 pg_hint_plan.enable_hint_table
2207 --------------------------------
2211 TRUNCATE hint_plan.hints;
2213 ---- No. A-9-1 parse error message output
2216 /*+"Set"(enable_indexscan on)*/SELECT 1;
2217 INFO: pg_hint_plan: hint syntax error at or near ""Set"(enable_indexscan on)"
2218 DETAIL: Unrecognized hint keyword ""Set"".
2224 /*+Set()(enable_indexscan on)*/SELECT 1;
2225 INFO: pg_hint_plan: hint syntax error at or near "Set()(enable_indexscan on)"
2226 DETAIL: Set hint requires name and value of GUC parameter.
2227 INFO: pg_hint_plan: hint syntax error at or near "(enable_indexscan on)"
2228 DETAIL: Unrecognized hint keyword "".
2234 /*+Set(enable_indexscan on*/SELECT 1;
2235 INFO: pg_hint_plan: hint syntax error at or near ""
2236 DETAIL: Closing parenthesis is necessary.
2243 ---- No. A-9-3 hint state output
2245 SET pg_hint_plan.debug_print TO on;
2246 SET client_min_messages TO LOG;
2249 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2258 --------------------
2264 /*+SeqScan(no_table)*/
2265 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2274 ------------------------------
2275 Index Scan using t1_i1 on t1
2276 Index Cond: (c1 = 1)
2280 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2282 -----------------------------------
2284 TID Cond: (ctid = '(1,1)'::tid)
2288 /*+TidScan(t1)BitmapScan(t1)*/
2289 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2290 INFO: pg_hint_plan: hint syntax error at or near "TidScan(t1)BitmapScan(t1)"
2291 DETAIL: Conflict scan method hint.
2301 ----------------------------------
2302 Bitmap Heap Scan on t1
2303 Recheck Cond: (c1 = 1)
2304 Filter: (ctid = '(1,1)'::tid)
2305 -> Bitmap Index Scan on t1_i1
2306 Index Cond: (c1 = 1)
2309 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)*/
2310 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2311 INFO: pg_hint_plan: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)"
2312 DETAIL: Conflict scan method hint.
2313 INFO: pg_hint_plan: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)"
2314 DETAIL: Conflict scan method hint.
2325 ---------------------------------
2326 Index Scan using t1_i1 on t1
2327 Index Cond: (c1 = 1)
2328 Filter: (ctid = '(1,1)'::tid)
2331 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)*/
2332 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2333 INFO: pg_hint_plan: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2334 DETAIL: Conflict scan method hint.
2335 INFO: pg_hint_plan: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2336 DETAIL: Conflict scan method hint.
2337 INFO: pg_hint_plan: hint syntax error at or near "IndexScan(t1)SeqScan(t1)"
2338 DETAIL: Conflict scan method hint.
2350 ------------------------------------------------
2352 Filter: ((c1 = 1) AND (ctid = '(1,1)'::tid))
2356 /*+Set(enable_indexscan enable)*/
2357 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2358 INFO: parameter "enable_indexscan" requires a Boolean value
2364 Set(enable_indexscan enable)
2367 ------------------------------
2368 Index Scan using t1_i1 on t1
2369 Index Cond: (c1 = 1)
2373 ---- No. A-10-1 hint state output
2375 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2376 EXPLAIN (COSTS false) EXECUTE p1;
2378 ------------------------------
2379 Index Scan using t1_i1 on t1
2380 Index Cond: (c1 = 1)
2384 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2385 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2387 -----------------------
2392 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2394 -----------------------
2399 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2401 -----------------------
2406 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2408 -----------------------
2413 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2415 -----------------------
2420 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2422 ---------------------
2431 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2433 EXPLAIN (COSTS false) EXECUTE p1;
2442 --------------------
2447 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2449 EXPLAIN (COSTS false) EXECUTE p1;
2458 --------------------
2465 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2467 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2476 ----------------------------------
2477 Bitmap Heap Scan on t1
2478 Recheck Cond: (c1 < 1000)
2479 -> Bitmap Index Scan on t1_i1
2480 Index Cond: (c1 < 1000)
2484 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2493 ----------------------------------
2494 Bitmap Heap Scan on t1
2495 Recheck Cond: (c1 < 1000)
2496 -> Bitmap Index Scan on t1_i1
2497 Index Cond: (c1 < 1000)
2501 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2510 ----------------------------------
2511 Bitmap Heap Scan on t1
2512 Recheck Cond: (c1 < 1000)
2513 -> Bitmap Index Scan on t1_i1
2514 Index Cond: (c1 < 1000)
2518 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2527 ----------------------------------
2528 Bitmap Heap Scan on t1
2529 Recheck Cond: (c1 < 1000)
2530 -> Bitmap Index Scan on t1_i1
2531 Index Cond: (c1 < 1000)
2535 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2544 ----------------------------------
2545 Bitmap Heap Scan on t1
2546 Recheck Cond: (c1 < 1000)
2547 -> Bitmap Index Scan on t1_i1
2548 Index Cond: (c1 < 1000)
2552 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2561 ----------------------------------
2562 Bitmap Heap Scan on t1
2563 Recheck Cond: (c1 < $1)
2564 -> Bitmap Index Scan on t1_i1
2565 Index Cond: (c1 < $1)
2568 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2570 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2579 ----------------------------------
2580 Bitmap Heap Scan on t1
2581 Recheck Cond: (c1 < $1)
2582 -> Bitmap Index Scan on t1_i1
2583 Index Cond: (c1 < $1)
2590 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2591 EXPLAIN (COSTS false) EXECUTE p1;
2600 --------------------
2605 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2606 EXPLAIN (COSTS false) EXECUTE p1;
2615 --------------------
2622 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2623 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2632 ----------------------------------
2633 Bitmap Heap Scan on t1
2634 Recheck Cond: (c1 < 1000)
2635 -> Bitmap Index Scan on t1_i1
2636 Index Cond: (c1 < 1000)
2639 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2648 ----------------------------------
2649 Bitmap Heap Scan on t1
2650 Recheck Cond: (c1 < 1000)
2651 -> Bitmap Index Scan on t1_i1
2652 Index Cond: (c1 < 1000)
2655 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2664 ----------------------------------
2665 Bitmap Heap Scan on t1
2666 Recheck Cond: (c1 < 1000)
2667 -> Bitmap Index Scan on t1_i1
2668 Index Cond: (c1 < 1000)
2671 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2680 ----------------------------------
2681 Bitmap Heap Scan on t1
2682 Recheck Cond: (c1 < 1000)
2683 -> Bitmap Index Scan on t1_i1
2684 Index Cond: (c1 < 1000)
2687 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2696 ----------------------------------
2697 Bitmap Heap Scan on t1
2698 Recheck Cond: (c1 < 1000)
2699 -> Bitmap Index Scan on t1_i1
2700 Index Cond: (c1 < 1000)
2703 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 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2720 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2729 ----------------------------------
2730 Bitmap Heap Scan on t1
2731 Recheck Cond: (c1 < $1)
2732 -> Bitmap Index Scan on t1_i1
2733 Index Cond: (c1 < $1)
2739 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2741 EXPLAIN (COSTS false) EXECUTE p1;
2743 ------------------------------
2744 Index Scan using t1_i1 on t1
2745 Index Cond: (c1 = 1)
2748 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2750 EXPLAIN (COSTS false) EXECUTE p1;
2752 ------------------------------
2753 Index Scan using t1_i1 on t1
2754 Index Cond: (c1 = 1)
2758 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2760 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2762 -----------------------
2767 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2769 -----------------------
2774 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2776 -----------------------
2781 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2783 -----------------------
2788 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2790 -----------------------
2795 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2797 ---------------------
2802 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2804 EXPLAIN (COSTS false) EXECUTE p1 (1000);
2806 ---------------------
2815 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2817 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2826 --------------------
2831 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2833 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2842 --------------------
2849 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2851 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2860 ----------------------------------
2861 Bitmap Heap Scan on t1
2862 Recheck Cond: (c1 < 1000)
2863 -> Bitmap Index Scan on t1_i1
2864 Index Cond: (c1 < 1000)
2868 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2877 ----------------------------------
2878 Bitmap Heap Scan on t1
2879 Recheck Cond: (c1 < 1000)
2880 -> Bitmap Index Scan on t1_i1
2881 Index Cond: (c1 < 1000)
2885 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2894 ----------------------------------
2895 Bitmap Heap Scan on t1
2896 Recheck Cond: (c1 < 1000)
2897 -> Bitmap Index Scan on t1_i1
2898 Index Cond: (c1 < 1000)
2902 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2911 ----------------------------------
2912 Bitmap Heap Scan on t1
2913 Recheck Cond: (c1 < 1000)
2914 -> Bitmap Index Scan on t1_i1
2915 Index Cond: (c1 < 1000)
2919 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2928 ----------------------------------
2929 Bitmap Heap Scan on t1
2930 Recheck Cond: (c1 < 1000)
2931 -> Bitmap Index Scan on t1_i1
2932 Index Cond: (c1 < 1000)
2936 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2945 ----------------------------------
2946 Bitmap Heap Scan on t1
2947 Recheck Cond: (c1 < $1)
2948 -> Bitmap Index Scan on t1_i1
2949 Index Cond: (c1 < $1)
2952 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2954 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2963 ----------------------------------
2964 Bitmap Heap Scan on t1
2965 Recheck Cond: (c1 < $1)
2966 -> Bitmap Index Scan on t1_i1
2967 Index Cond: (c1 < $1)
2974 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2975 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2984 --------------------
2989 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2990 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2999 --------------------
3006 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
3007 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3016 ----------------------------------
3017 Bitmap Heap Scan on t1
3018 Recheck Cond: (c1 < 1000)
3019 -> Bitmap Index Scan on t1_i1
3020 Index Cond: (c1 < 1000)
3023 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3032 ----------------------------------
3033 Bitmap Heap Scan on t1
3034 Recheck Cond: (c1 < 1000)
3035 -> Bitmap Index Scan on t1_i1
3036 Index Cond: (c1 < 1000)
3039 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3048 ----------------------------------
3049 Bitmap Heap Scan on t1
3050 Recheck Cond: (c1 < 1000)
3051 -> Bitmap Index Scan on t1_i1
3052 Index Cond: (c1 < 1000)
3055 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3064 ----------------------------------
3065 Bitmap Heap Scan on t1
3066 Recheck Cond: (c1 < 1000)
3067 -> Bitmap Index Scan on t1_i1
3068 Index Cond: (c1 < 1000)
3071 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3080 ----------------------------------
3081 Bitmap Heap Scan on t1
3082 Recheck Cond: (c1 < 1000)
3083 -> Bitmap Index Scan on t1_i1
3084 Index Cond: (c1 < 1000)
3087 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3096 ----------------------------------
3097 Bitmap Heap Scan on t1
3098 Recheck Cond: (c1 < $1)
3099 -> Bitmap Index Scan on t1_i1
3100 Index Cond: (c1 < $1)
3103 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
3104 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3113 ----------------------------------
3114 Bitmap Heap Scan on t1
3115 Recheck Cond: (c1 < $1)
3116 -> Bitmap Index Scan on t1_i1
3117 Index Cond: (c1 < $1)
3123 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3125 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
3127 ------------------------------
3128 Index Scan using t1_i1 on t1
3129 Index Cond: (c1 = 1)
3132 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
3134 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
3136 ------------------------------
3137 Index Scan using t1_i1 on t1
3138 Index Cond: (c1 = 1)
3142 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
3144 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3146 -----------------------
3152 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3154 -----------------------
3160 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3162 -----------------------
3168 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3170 -----------------------
3176 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3178 -----------------------
3184 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3186 ---------------------
3191 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
3193 EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3195 ---------------------
3202 ---- No. A-10-4 EXECUTE statement name error
3206 ERROR: prepared statement "p1" does not exist
3207 SHOW pg_hint_plan.debug_print;
3208 pg_hint_plan.debug_print
3209 --------------------------
3214 ---- No. A-11-5 EXECUTE statement name error
3217 SELECT pg_stat_statements_reset();
3218 pg_stat_statements_reset
3219 --------------------------
3223 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3229 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3232 Set(enable_seqscan off)
3242 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3255 SELECT s.query, s.calls
3256 FROM public.pg_stat_statements s
3257 JOIN pg_catalog.pg_database d
3261 --------------------------------------+-------
3262 SELECT * FROM s1.t1 WHERE t1.c1 = ?; | 3
3263 SELECT pg_stat_statements_reset(); | 1
3267 ---- No. A-12-1 reset of global variable of core at the error
3268 ---- No. A-12-2 reset of global variable of original at the error
3270 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3272 ------------------------------------
3274 Merge Cond: (t1.c1 = t2.c1)
3275 -> Index Scan using t1_i1 on t1
3281 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3282 PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3283 EXPLAIN (COSTS false) EXECUTE p1;
3284 INFO: pg_hint_plan: hint syntax error at or near "NestLoop(t1 t1)"
3285 DETAIL: Relation name "t1" is duplicated.
3290 Set(enable_seqscan off)
3291 Set(geqo_threshold 100)
3298 ------------------------------------
3300 Merge Cond: (t1.c1 = t2.c1)
3304 -> Index Scan using t2_i1 on t2
3309 SELECT name, setting FROM settings;
3311 ---------------------------+-----------
3314 geqo_generations | 0
3317 geqo_selection_bias | 2
3319 constraint_exclusion | partition
3320 cursor_tuple_fraction | 0.1
3321 default_statistics_target | 100
3322 from_collapse_limit | 8
3323 join_collapse_limit | 8
3324 cpu_index_tuple_cost | 0.005
3325 cpu_operator_cost | 0.0025
3326 cpu_tuple_cost | 0.01
3327 effective_cache_size | 16384
3328 random_page_cost | 4
3330 enable_bitmapscan | on
3332 enable_hashjoin | on
3333 enable_indexonlyscan | on
3334 enable_indexscan | on
3335 enable_material | on
3336 enable_mergejoin | on
3337 enable_nestloop | on
3341 client_min_messages | log
3344 SET pg_hint_plan.parse_messages TO error;
3345 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3346 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3347 ERROR: pg_hint_plan: hint syntax error at or near "NestLoop(t1 t1)"
3348 DETAIL: Relation name "t1" is duplicated.
3349 SELECT name, setting FROM settings;
3351 ---------------------------+-----------
3354 geqo_generations | 0
3357 geqo_selection_bias | 2
3359 constraint_exclusion | partition
3360 cursor_tuple_fraction | 0.1
3361 default_statistics_target | 100
3362 from_collapse_limit | 8
3363 join_collapse_limit | 8
3364 cpu_index_tuple_cost | 0.005
3365 cpu_operator_cost | 0.0025
3366 cpu_tuple_cost | 0.01
3367 effective_cache_size | 16384
3368 random_page_cost | 4
3370 enable_bitmapscan | on
3372 enable_hashjoin | on
3373 enable_indexonlyscan | on
3374 enable_indexscan | on
3375 enable_material | on
3376 enable_mergejoin | on
3377 enable_nestloop | on
3381 client_min_messages | log
3384 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3385 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3390 Set(enable_seqscan off)
3391 Set(geqo_threshold 100)
3397 ------------------------------------
3399 Merge Cond: (t1.c1 = t2.c1)
3403 -> Index Scan using t2_i1 on t2
3408 SELECT name, setting FROM settings;
3410 ---------------------------+-----------
3413 geqo_generations | 0
3416 geqo_selection_bias | 2
3418 constraint_exclusion | partition
3419 cursor_tuple_fraction | 0.1
3420 default_statistics_target | 100
3421 from_collapse_limit | 8
3422 join_collapse_limit | 8
3423 cpu_index_tuple_cost | 0.005
3424 cpu_operator_cost | 0.0025
3425 cpu_tuple_cost | 0.01
3426 effective_cache_size | 16384
3427 random_page_cost | 4
3429 enable_bitmapscan | on
3431 enable_hashjoin | on
3432 enable_indexonlyscan | on
3433 enable_indexscan | on
3434 enable_material | on
3435 enable_mergejoin | on
3436 enable_nestloop | on
3440 client_min_messages | log
3443 SET pg_hint_plan.parse_messages TO error;
3444 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3445 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3446 ERROR: pg_hint_plan: hint syntax error at or near "NestLoop(t1 t1)"
3447 DETAIL: Relation name "t1" is duplicated.
3448 SELECT name, setting FROM settings;
3450 ---------------------------+-----------
3453 geqo_generations | 0
3456 geqo_selection_bias | 2
3458 constraint_exclusion | partition
3459 cursor_tuple_fraction | 0.1
3460 default_statistics_target | 100
3461 from_collapse_limit | 8
3462 join_collapse_limit | 8
3463 cpu_index_tuple_cost | 0.005
3464 cpu_operator_cost | 0.0025
3465 cpu_tuple_cost | 0.01
3466 effective_cache_size | 16384
3467 random_page_cost | 4
3469 enable_bitmapscan | on
3471 enable_hashjoin | on
3472 enable_indexonlyscan | on
3473 enable_indexscan | on
3474 enable_material | on
3475 enable_mergejoin | on
3476 enable_nestloop | on
3480 client_min_messages | log
3483 EXPLAIN (COSTS false) EXECUTE p1;
3485 ------------------------------------
3487 Merge Cond: (t1.c1 = t2.c1)
3491 -> Index Scan using t2_i1 on t2
3496 SELECT name, setting FROM settings;
3498 ---------------------------+-----------
3501 geqo_generations | 0
3504 geqo_selection_bias | 2
3506 constraint_exclusion | partition
3507 cursor_tuple_fraction | 0.1
3508 default_statistics_target | 100
3509 from_collapse_limit | 8
3510 join_collapse_limit | 8
3511 cpu_index_tuple_cost | 0.005
3512 cpu_operator_cost | 0.0025
3513 cpu_tuple_cost | 0.01
3514 effective_cache_size | 16384
3515 random_page_cost | 4
3517 enable_bitmapscan | on
3519 enable_hashjoin | on
3520 enable_indexonlyscan | on
3521 enable_indexscan | on
3522 enable_material | on
3523 enable_mergejoin | on
3524 enable_nestloop | on
3528 client_min_messages | log
3531 SET pg_hint_plan.parse_messages TO error;
3532 EXPLAIN (COSTS false) EXECUTE p2;
3533 ERROR: prepared statement "p2" does not exist
3534 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3535 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3540 Set(enable_seqscan off)
3541 Set(geqo_threshold 100)
3547 ------------------------------------
3549 Merge Cond: (t1.c1 = t2.c1)
3553 -> Index Scan using t2_i1 on t2
3556 EXPLAIN (COSTS false) EXECUTE p1;
3558 ------------------------------------
3560 Merge Cond: (t1.c1 = t2.c1)
3564 -> Index Scan using t2_i1 on t2
3567 SELECT name, setting FROM settings;
3569 ---------------------------+-----------
3572 geqo_generations | 0
3575 geqo_selection_bias | 2
3577 constraint_exclusion | partition
3578 cursor_tuple_fraction | 0.1
3579 default_statistics_target | 100
3580 from_collapse_limit | 8
3581 join_collapse_limit | 8
3582 cpu_index_tuple_cost | 0.005
3583 cpu_operator_cost | 0.0025
3584 cpu_tuple_cost | 0.01
3585 effective_cache_size | 16384
3586 random_page_cost | 4
3588 enable_bitmapscan | on
3590 enable_hashjoin | on
3591 enable_indexonlyscan | on
3592 enable_indexscan | on
3593 enable_material | on
3594 enable_mergejoin | on
3595 enable_nestloop | on
3599 client_min_messages | log
3604 SELECT name, setting FROM settings;
3606 ---------------------------+-----------
3609 geqo_generations | 0
3612 geqo_selection_bias | 2
3614 constraint_exclusion | partition
3615 cursor_tuple_fraction | 0.1
3616 default_statistics_target | 100
3617 from_collapse_limit | 8
3618 join_collapse_limit | 8
3619 cpu_index_tuple_cost | 0.005
3620 cpu_operator_cost | 0.0025
3621 cpu_tuple_cost | 0.01
3622 effective_cache_size | 16384
3623 random_page_cost | 4
3625 enable_bitmapscan | on
3627 enable_hashjoin | on
3628 enable_indexonlyscan | on
3629 enable_indexscan | on
3630 enable_material | on
3631 enable_mergejoin | on
3632 enable_nestloop | on
3636 client_min_messages | log
3639 SET pg_hint_plan.parse_messages TO error;
3640 EXPLAIN (COSTS false) EXECUTE p2;
3641 ERROR: prepared statement "p2" does not exist
3642 EXPLAIN (COSTS false) EXECUTE p1;
3644 ------------------------------------
3646 Merge Cond: (t1.c1 = t2.c1)
3650 -> Index Scan using t2_i1 on t2
3653 SELECT name, setting FROM settings;
3655 ---------------------------+-----------
3658 geqo_generations | 0
3661 geqo_selection_bias | 2
3663 constraint_exclusion | partition
3664 cursor_tuple_fraction | 0.1
3665 default_statistics_target | 100
3666 from_collapse_limit | 8
3667 join_collapse_limit | 8
3668 cpu_index_tuple_cost | 0.005
3669 cpu_operator_cost | 0.0025
3670 cpu_tuple_cost | 0.01
3671 effective_cache_size | 16384
3672 random_page_cost | 4
3674 enable_bitmapscan | on
3676 enable_hashjoin | on
3677 enable_indexonlyscan | on
3678 enable_indexscan | on
3679 enable_material | on
3680 enable_mergejoin | on
3681 enable_nestloop | on
3685 client_min_messages | log
3689 SET pg_hint_plan.parse_messages TO LOG;
3691 ---- No. A-12-3 effective range of the hint
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
3705 SET enable_indexscan TO off;
3706 SET enable_mergejoin TO off;
3707 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3709 ------------------------------
3711 Hash Cond: (t1.c1 = t2.c1)
3717 SELECT name, setting FROM settings;
3719 ---------------------------+-----------
3722 geqo_generations | 0
3725 geqo_selection_bias | 2
3727 constraint_exclusion | partition
3728 cursor_tuple_fraction | 0.1
3729 default_statistics_target | 100
3730 from_collapse_limit | 8
3731 join_collapse_limit | 8
3732 cpu_index_tuple_cost | 0.005
3733 cpu_operator_cost | 0.0025
3734 cpu_tuple_cost | 0.01
3735 effective_cache_size | 16384
3736 random_page_cost | 4
3738 enable_bitmapscan | on
3740 enable_hashjoin | on
3741 enable_indexonlyscan | on
3742 enable_indexscan | off
3743 enable_material | on
3744 enable_mergejoin | off
3745 enable_nestloop | on
3749 client_min_messages | log
3752 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3753 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3759 Set(enable_indexscan on)
3760 Set(geqo_threshold 100)
3766 ------------------------------------
3768 Merge Cond: (t1.c1 = t2.c1)
3769 -> Index Scan using t1_i1 on t1
3770 -> Index Scan using t2_i1 on t2
3773 SELECT name, setting FROM settings;
3775 ---------------------------+-----------
3778 geqo_generations | 0
3781 geqo_selection_bias | 2
3783 constraint_exclusion | partition
3784 cursor_tuple_fraction | 0.1
3785 default_statistics_target | 100
3786 from_collapse_limit | 8
3787 join_collapse_limit | 8
3788 cpu_index_tuple_cost | 0.005
3789 cpu_operator_cost | 0.0025
3790 cpu_tuple_cost | 0.01
3791 effective_cache_size | 16384
3792 random_page_cost | 4
3794 enable_bitmapscan | on
3796 enable_hashjoin | on
3797 enable_indexonlyscan | on
3798 enable_indexscan | off
3799 enable_material | on
3800 enable_mergejoin | off
3801 enable_nestloop | on
3805 client_min_messages | log
3808 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3810 ------------------------------
3812 Hash Cond: (t1.c1 = t2.c1)
3819 SET enable_indexscan TO off;
3820 SET enable_mergejoin TO off;
3821 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3823 ------------------------------
3825 Hash Cond: (t1.c1 = t2.c1)
3831 SELECT name, setting FROM settings;
3833 ---------------------------+-----------
3836 geqo_generations | 0
3839 geqo_selection_bias | 2
3841 constraint_exclusion | partition
3842 cursor_tuple_fraction | 0.1
3843 default_statistics_target | 100
3844 from_collapse_limit | 8
3845 join_collapse_limit | 8
3846 cpu_index_tuple_cost | 0.005
3847 cpu_operator_cost | 0.0025
3848 cpu_tuple_cost | 0.01
3849 effective_cache_size | 16384
3850 random_page_cost | 4
3852 enable_bitmapscan | on
3854 enable_hashjoin | on
3855 enable_indexonlyscan | on
3856 enable_indexscan | off
3857 enable_material | on
3858 enable_mergejoin | off
3859 enable_nestloop | on
3863 client_min_messages | log
3867 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3868 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3874 Set(enable_indexscan on)
3875 Set(geqo_threshold 100)
3881 ------------------------------------
3883 Merge Cond: (t1.c1 = t2.c1)
3884 -> Index Scan using t1_i1 on t1
3885 -> Index Scan using t2_i1 on t2
3890 SELECT name, setting FROM settings;
3892 ---------------------------+-----------
3895 geqo_generations | 0
3898 geqo_selection_bias | 2
3900 constraint_exclusion | partition
3901 cursor_tuple_fraction | 0.1
3902 default_statistics_target | 100
3903 from_collapse_limit | 8
3904 join_collapse_limit | 8
3905 cpu_index_tuple_cost | 0.005
3906 cpu_operator_cost | 0.0025
3907 cpu_tuple_cost | 0.01
3908 effective_cache_size | 16384
3909 random_page_cost | 4
3911 enable_bitmapscan | on
3913 enable_hashjoin | on
3914 enable_indexonlyscan | on
3915 enable_indexscan | off
3916 enable_material | on
3917 enable_mergejoin | off
3918 enable_nestloop | on
3922 client_min_messages | log
3925 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3927 ------------------------------
3929 Hash Cond: (t1.c1 = t2.c1)
3937 SET enable_indexscan TO off;
3938 SET enable_mergejoin TO off;
3939 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3941 ------------------------------
3943 Hash Cond: (t1.c1 = t2.c1)
3949 SELECT name, setting FROM settings;
3951 ---------------------------+-----------
3954 geqo_generations | 0
3957 geqo_selection_bias | 2
3959 constraint_exclusion | partition
3960 cursor_tuple_fraction | 0.1
3961 default_statistics_target | 100
3962 from_collapse_limit | 8
3963 join_collapse_limit | 8
3964 cpu_index_tuple_cost | 0.005
3965 cpu_operator_cost | 0.0025
3966 cpu_tuple_cost | 0.01
3967 effective_cache_size | 16384
3968 random_page_cost | 4
3970 enable_bitmapscan | on
3972 enable_hashjoin | on
3973 enable_indexonlyscan | on
3974 enable_indexscan | off
3975 enable_material | on
3976 enable_mergejoin | off
3977 enable_nestloop | on
3981 client_min_messages | log
3984 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3985 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3991 Set(enable_indexscan on)
3992 Set(geqo_threshold 100)
3998 ------------------------------------
4000 Merge Cond: (t1.c1 = t2.c1)
4001 -> Index Scan using t1_i1 on t1
4002 -> Index Scan using t2_i1 on t2
4006 SET enable_indexscan TO off;
4007 SET enable_mergejoin TO off;
4008 LOAD 'pg_hint_plan';
4009 SELECT name, setting FROM settings;
4011 ---------------------------+-----------
4014 geqo_generations | 0
4017 geqo_selection_bias | 2
4019 constraint_exclusion | partition
4020 cursor_tuple_fraction | 0.1
4021 default_statistics_target | 100
4022 from_collapse_limit | 8
4023 join_collapse_limit | 8
4024 cpu_index_tuple_cost | 0.005
4025 cpu_operator_cost | 0.0025
4026 cpu_tuple_cost | 0.01
4027 effective_cache_size | 16384
4028 random_page_cost | 4
4030 enable_bitmapscan | on
4032 enable_hashjoin | on
4033 enable_indexonlyscan | on
4034 enable_indexscan | off
4035 enable_material | on
4036 enable_mergejoin | off
4037 enable_nestloop | on
4041 client_min_messages | notice
4044 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4046 ------------------------------
4048 Hash Cond: (t1.c1 = t2.c1)
4054 SET pg_hint_plan.enable_hint TO on;
4055 SET pg_hint_plan.debug_print TO on;
4056 SET client_min_messages TO LOG;
4057 SET search_path TO public;
4058 RESET enable_indexscan;
4059 RESET enable_mergejoin;
4061 ---- No. A-13 call planner recursively
4063 CREATE OR REPLACE FUNCTION nested_planner(cnt int) RETURNS int AS $$
4067 RAISE NOTICE 'nested_planner(%)', cnt;
4074 SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) INTO new_cnt
4076 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4077 ORDER BY t_1.c1 LIMIT 1;
4081 $$ LANGUAGE plpgsql IMMUTABLE;
4083 ---- No. A-13-2 use hint of main query
4086 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4087 NOTICE: nested_planner(1)
4089 ---------------------------------------
4090 Index Only Scan using t1_i1 on t1 t_1
4094 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4095 NOTICE: nested_planner(1)
4104 --------------------------
4107 -> Seq Scan on t1 t_1
4111 ---- No. A-13-3 output number of times of debugging log
4114 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4115 NOTICE: nested_planner(1)
4117 ---------------------------------------
4118 Index Only Scan using t1_i1 on t1 t_1
4122 EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4123 NOTICE: nested_planner(1)
4132 ---------------------------------------
4133 Index Only Scan using t1_i1 on t1 t_1
4137 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
4138 NOTICE: nested_planner(2)
4139 NOTICE: nested_planner(1)
4140 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4141 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4142 ORDER BY t_1.c1 LIMIT 1"
4143 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4151 CONTEXT: 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(integer) line 12 at SQL statement
4156 ---------------------------------------
4157 Index Only Scan using t1_i1 on t1 t_1
4161 EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
4162 NOTICE: nested_planner(2)
4163 NOTICE: nested_planner(1)
4164 CONTEXT: 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(integer) line 12 at SQL statement
4175 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4176 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4177 ORDER BY t_1.c1 LIMIT 1"
4178 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4187 ---------------------------------------
4188 Index Only Scan using t1_i1 on t1 t_1
4193 -- Redefine not to use cached plan
4195 CREATE OR REPLACE FUNCTION nested_planner(cnt int) RETURNS int AS $$
4199 RAISE NOTICE 'nested_planner(%)', cnt;
4206 SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) INTO new_cnt
4208 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4209 ORDER BY t_1.c1 LIMIT 1;
4213 $$ LANGUAGE plpgsql IMMUTABLE;
4214 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
4215 NOTICE: nested_planner(5)
4216 NOTICE: nested_planner(4)
4217 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4218 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4219 ORDER BY t_1.c1 LIMIT 1"
4220 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4221 NOTICE: nested_planner(3)
4222 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4223 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4224 ORDER BY t_1.c1 LIMIT 1"
4225 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4226 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4227 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4228 ORDER BY t_1.c1 LIMIT 1"
4229 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4230 NOTICE: nested_planner(2)
4231 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4232 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4233 ORDER BY t_1.c1 LIMIT 1"
4234 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4235 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4236 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4237 ORDER BY t_1.c1 LIMIT 1"
4238 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4239 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4240 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4241 ORDER BY t_1.c1 LIMIT 1"
4242 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4243 NOTICE: nested_planner(1)
4244 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4245 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4246 ORDER BY t_1.c1 LIMIT 1"
4247 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4248 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4249 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4250 ORDER BY t_1.c1 LIMIT 1"
4251 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4252 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4253 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4254 ORDER BY t_1.c1 LIMIT 1"
4255 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4256 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4257 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4258 ORDER BY t_1.c1 LIMIT 1"
4259 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4262 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4263 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4264 ORDER BY t_1.c1 LIMIT 1"
4265 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4266 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4267 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4268 ORDER BY t_1.c1 LIMIT 1"
4269 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4270 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4271 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4272 ORDER BY t_1.c1 LIMIT 1"
4273 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4274 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4275 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4276 ORDER BY t_1.c1 LIMIT 1"
4277 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4285 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4286 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4287 ORDER BY t_1.c1 LIMIT 1"
4288 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4289 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4290 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4291 ORDER BY t_1.c1 LIMIT 1"
4292 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4293 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4294 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4295 ORDER BY t_1.c1 LIMIT 1"
4296 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4304 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4305 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4306 ORDER BY t_1.c1 LIMIT 1"
4307 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4308 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4309 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4310 ORDER BY t_1.c1 LIMIT 1"
4311 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4319 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4320 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4321 ORDER BY t_1.c1 LIMIT 1"
4322 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4324 ---------------------------------------
4325 Index Only Scan using t1_i1 on t1 t_1
4329 EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
4330 NOTICE: nested_planner(5)
4331 NOTICE: nested_planner(4)
4332 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4333 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4334 ORDER BY t_1.c1 LIMIT 1"
4335 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4336 NOTICE: nested_planner(3)
4337 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4338 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4339 ORDER BY t_1.c1 LIMIT 1"
4340 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4341 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4342 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4343 ORDER BY t_1.c1 LIMIT 1"
4344 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4345 NOTICE: nested_planner(2)
4346 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4347 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4348 ORDER BY t_1.c1 LIMIT 1"
4349 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4350 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4351 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4352 ORDER BY t_1.c1 LIMIT 1"
4353 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4354 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4355 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4356 ORDER BY t_1.c1 LIMIT 1"
4357 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4358 NOTICE: nested_planner(1)
4359 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4360 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4361 ORDER BY t_1.c1 LIMIT 1"
4362 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4363 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4364 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4365 ORDER BY t_1.c1 LIMIT 1"
4366 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4367 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4368 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4369 ORDER BY t_1.c1 LIMIT 1"
4370 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4371 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4372 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4373 ORDER BY t_1.c1 LIMIT 1"
4374 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4382 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4383 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4384 ORDER BY t_1.c1 LIMIT 1"
4385 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4386 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4387 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4388 ORDER BY t_1.c1 LIMIT 1"
4389 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4390 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4391 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4392 ORDER BY t_1.c1 LIMIT 1"
4393 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4394 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4395 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4396 ORDER BY t_1.c1 LIMIT 1"
4397 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4405 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4406 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4407 ORDER BY t_1.c1 LIMIT 1"
4408 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4409 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4410 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4411 ORDER BY t_1.c1 LIMIT 1"
4412 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4413 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4414 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4415 ORDER BY t_1.c1 LIMIT 1"
4416 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4424 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4425 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4426 ORDER BY t_1.c1 LIMIT 1"
4427 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4428 SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4429 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4430 ORDER BY t_1.c1 LIMIT 1"
4431 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4439 CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4440 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4441 ORDER BY t_1.c1 LIMIT 1"
4442 PL/pgSQL function nested_planner(integer) line 12 at SQL statement
4451 ---------------------------------------
4452 Index Only Scan using t1_i1 on t1 t_1
4456 ---- No. A-13-4 output of debugging log on hint status
4458 CREATE OR REPLACE FUNCTION recall_planner() RETURNS int AS $$
4459 SELECT /*+ IndexScan(t_1) */t_1.c1
4461 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4462 ORDER BY t_1.c1 LIMIT 1;
4463 $$ LANGUAGE SQL IMMUTABLE;
4465 /*+HashJoin(t_1 t_2)*/
4466 EXPLAIN (COSTS false)
4467 SELECT recall_planner() FROM s1.t1 t_1
4468 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4477 CONTEXT: SQL function "recall_planner" during startup
4486 --------------------------------------
4490 Hash Cond: (t_1.c1 = t_2.c1)
4491 -> Seq Scan on t1 t_1
4493 -> Seq Scan on t2 t_2
4497 /*+HashJoin(st_1 st_2)*/
4498 EXPLAIN (COSTS false)
4499 SELECT recall_planner() FROM s1.t1 st_1
4500 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4509 CONTEXT: SQL function "recall_planner" during startup
4518 ----------------------------------------
4522 Hash Cond: (st_1.c1 = st_2.c1)
4523 -> Seq Scan on t1 st_1
4525 -> Seq Scan on t2 st_2
4529 /*+HashJoin(t_1 t_2)*/
4530 EXPLAIN (COSTS false)
4531 SELECT recall_planner() FROM s1.t1 st_1
4532 JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4541 CONTEXT: SQL function "recall_planner" during startup
4550 ----------------------------------------------
4552 Merge Cond: (st_1.c1 = st_2.c1)
4553 -> Index Only Scan using t1_i1 on t1 st_1
4556 -> Seq Scan on t2 st_2
4560 /*+HashJoin(st_1 st_2)*/
4561 EXPLAIN (COSTS false)
4562 SELECT recall_planner() FROM s1.t1 t_1
4563 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4572 CONTEXT: SQL function "recall_planner" during startup
4581 ---------------------------------------------
4583 Merge Cond: (t_1.c1 = t_2.c1)
4584 -> Index Only Scan using t1_i1 on t1 t_1
4587 -> Seq Scan on t2 t_2
4591 /*+HashJoin(t_1 t_1)*/
4592 EXPLAIN (COSTS false)
4593 SELECT recall_planner() FROM s1.t1 t_1
4595 INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t_1 t_1)"
4596 DETAIL: Relation name "t_1" is duplicated.
4597 CONTEXT: SQL function "recall_planner" during startup
4605 CONTEXT: SQL function "recall_planner" during startup
4614 ---------------------------------------
4615 Index Only Scan using t1_i1 on t1 t_1
4619 CREATE OR REPLACE FUNCTION recall_planner_one_t() RETURNS int AS $$
4620 SELECT /*+ IndexScan(t_1) */t_1.c1
4622 ORDER BY t_1.c1 LIMIT 1;
4623 $$ LANGUAGE SQL IMMUTABLE;
4624 EXPLAIN (COSTS false)
4625 SELECT recall_planner_one_t() FROM s1.t1 t_1
4626 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4629 ---------------------------------------------
4631 Merge Cond: (t_1.c1 = t_2.c1)
4632 -> Index Only Scan using t1_i1 on t1 t_1
4635 -> Seq Scan on t2 t_2
4638 /*+HashJoin(t_1 t_1)*/
4639 EXPLAIN (COSTS false)
4640 SELECT recall_planner_one_t() FROM s1.t1 t_1
4641 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4650 CONTEXT: SQL function "recall_planner_one_t" during startup
4651 INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t_1 t_1)"
4652 DETAIL: Relation name "t_1" is duplicated.
4661 ---------------------------------------------
4663 Merge Cond: (t_1.c1 = t_2.c1)
4664 -> Index Only Scan using t1_i1 on t1 t_1
4667 -> Seq Scan on t2 t_2
4670 DROP FUNCTION recall_planner_one_t(int);
4671 ERROR: function recall_planner_one_t(integer) does not exist
4673 /*+HashJoin(t_1 t_1)*/
4674 EXPLAIN (COSTS false)
4675 SELECT recall_planner() FROM s1.t1 t_1
4676 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4678 INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t_1 t_1)"
4679 DETAIL: Relation name "t_1" is duplicated.
4680 CONTEXT: SQL function "recall_planner" during startup
4688 CONTEXT: SQL function "recall_planner" during startup
4689 INFO: pg_hint_plan: hint syntax error at or near "HashJoin(t_1 t_1)"
4690 DETAIL: Relation name "t_1" is duplicated.
4699 ---------------------------------------------
4701 Merge Cond: (t_1.c1 = t_2.c1)
4702 -> Index Only Scan using t1_i1 on t1 t_1
4705 -> Seq Scan on t2 t_2
4709 /*+MergeJoin(t_1 t_2)HashJoin(t_1 t_2)*/
4710 EXPLAIN (COSTS false)
4711 SELECT recall_planner() FROM s1.t1 t_1
4712 JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4714 INFO: pg_hint_plan: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4715 DETAIL: Conflict join method hint.
4716 INFO: pg_hint_plan: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4717 DETAIL: Conflict join method hint.
4718 CONTEXT: SQL function "recall_planner" during startup
4727 CONTEXT: SQL function "recall_planner" during startup
4737 --------------------------------------
4741 Hash Cond: (t_1.c1 = t_2.c1)
4742 -> Seq Scan on t1 t_1
4744 -> Seq Scan on t2 t_2