2 SET pg_hint_plan.enable TO on;
3 SET pg_hint_plan.debug_print TO on;
4 SET client_min_messages TO LOG;
5 SET search_path TO public;
7 ---- No. A-5-1 hint format
11 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
27 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
29 ------------------------------
30 Index Scan using t1_i1 on t1
36 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
38 ------------------------------
39 Index Scan using t1_i1 on t1
45 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
47 ------------------------------
48 Index Scan using t1_i1 on t1
54 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
56 ------------------------------
57 Index Scan using t1_i1 on t1
63 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
65 ------------------------------
66 Index Scan using t1_i1 on t1
71 /*+SeqScan(t1) /* nest comment */ */
72 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
73 INFO: hint syntax error at or near "/* nest comment */ */
74 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
75 DETAIL: Block comments nest doesn't supported.
77 ------------------------------
78 Index Scan using t1_i1 on t1
83 /* +SeqScan(t1) /* nest comment */ */
84 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
86 ------------------------------
87 Index Scan using t1_i1 on t1
92 /*SeqScan(t1) /* nest comment */ */
93 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
95 ------------------------------
96 Index Scan using t1_i1 on t1
101 ---- No. A-5-2 hint position
105 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
122 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
124 ------------------------------
125 Index Scan using t1_i1 on t1
130 EXPLAIN (COSTS false) SELECT /*+SeqScan(t1)*/ * FROM s1.t1 WHERE t1.c1 = 1;
132 ------------------------------
133 Index Scan using t1_i1 on t1
138 ---- No. A-5-4 hint delimiter
140 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
142 ------------------------------
143 Index Scan using t1_i1 on t1
154 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
155 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
158 Set(enable_bitmapscan off)
159 Set(enable_indexscan off)
171 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
172 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
175 Set(enable_bitmapscan off)
176 Set(enable_indexscan off)
188 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
189 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
192 Set(enable_bitmapscan off)
193 Set(enable_indexscan off)
205 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
206 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
209 Set(enable_bitmapscan off)
210 Set(enable_indexscan off)
222 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
223 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
226 Set(enable_bitmapscan off)
227 Set(enable_indexscan off)
239 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
240 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
243 Set(enable_bitmapscan off)
244 Set(enable_indexscan off)
256 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
257 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
260 Set(enable_bitmapscan off)
261 Set(enable_indexscan off)
273 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
274 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
277 Set(enable_bitmapscan off)
278 Set(enable_indexscan off)
290 /*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
291 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
294 Set(enable_bitmapscan off)
295 Set(enable_indexscan off)
307 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
308 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
311 Set(enable_bitmapscan off)
312 Set(enable_indexscan off)
324 /*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
325 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
328 Set(enable_bitmapscan off)
329 Set(enable_indexscan off)
341 /*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
342 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
345 Set(enable_bitmapscan off)
346 Set(enable_indexscan off)
358 /*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
359 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
362 Set(enable_bitmapscan off)
363 Set(enable_indexscan off)
375 /*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
376 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
379 Set(enable_bitmapscan off)
380 Set(enable_indexscan off)
392 /*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
393 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
396 Set(enable_bitmapscan off)
397 Set(enable_indexscan off)
410 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
411 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
414 Set(enable_bitmapscan off)
415 Set(enable_indexscan off)
427 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
429 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
432 Set(enable_bitmapscan off)
433 Set(enable_indexscan off)
447 (enable_indexscan"off")
449 (enable_bitmapscan"off")*/
450 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
453 Set(enable_bitmapscan off)
454 Set(enable_indexscan off)
468 enable_indexscan"off")Set
470 enable_bitmapscan"off")*/
471 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
474 Set(enable_bitmapscan off)
475 Set(enable_indexscan off)
487 /*+Set(enable_indexscan"off"
489 Set(enable_bitmapscan"off"
492 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
495 Set(enable_bitmapscan off)
496 Set(enable_indexscan off)
515 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
518 Set(enable_bitmapscan off)
519 Set(enable_indexscan off)
543 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
546 Set(enable_bitmapscan off)
547 Set(enable_indexscan off)
560 Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
561 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
564 Set(enable_bitmapscan off)
565 Set(enable_indexscan off)
577 /*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
579 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
582 Set(enable_bitmapscan off)
583 Set(enable_indexscan off)
597 (enable_indexscan"off")
599 (enable_bitmapscan"off")*/
600 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
603 Set(enable_bitmapscan off)
604 Set(enable_indexscan off)
618 enable_indexscan"off")Set
620 enable_bitmapscan"off")*/
621 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
624 Set(enable_bitmapscan off)
625 Set(enable_indexscan off)
637 /*+Set(enable_indexscan"off"
639 Set(enable_bitmapscan"off"
642 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
645 Set(enable_bitmapscan off)
646 Set(enable_indexscan off)
665 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
668 Set(enable_bitmapscan off)
669 Set(enable_indexscan off)
693 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
696 Set(enable_bitmapscan off)
697 Set(enable_indexscan off)
709 ---- No. A-5-5 hint object pattern
710 ---- No. A-7-2 message object pattern
715 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
730 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
745 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
760 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
777 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
792 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
801 ----------------------
807 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
822 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
831 ----------------------
839 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
854 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
863 ----------------------
869 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
884 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(((" WHERE "(((".c1 = 1;
893 ----------------------
901 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
902 INFO: hint syntax error at or near "))"
903 DETAIL: Relation name is necessary.
905 ----------------------------------
906 Index Scan using t1_i1 on t1 ")"
911 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
926 EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")))" WHERE ")))".c1 = 1;
935 ----------------------
943 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
944 INFO: hint syntax error at or near ""
945 DETAIL: Unterminated quoted relation name.
947 -----------------------------------
948 Index Scan using t1_i1 on t1 """"
953 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
962 ---------------------
967 /*+SeqScan("""""""")*/
968 EXPLAIN (COSTS false) SELECT * FROM s1.t1 """""""" WHERE """""""".c1 = 1;
977 -------------------------
978 Seq Scan on t1 """"""""
985 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
986 INFO: hint syntax error at or near ")"
987 DETAIL: Relation name is necessary.
989 ----------------------------------
990 Index Scan using t1_i1 on t1 " "
995 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1004 --------------------
1010 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1019 ----------------------
1027 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1028 INFO: hint syntax error at or near ")"
1029 DETAIL: Relation name is necessary.
1031 -----------------------------------
1032 Index Scan using t1_i1 on t1 " "
1033 Index Cond: (c1 = 1)
1037 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1046 ---------------------------
1052 EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1061 -------------------------------------------
1070 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1073 INFO: hint syntax error at or near ")"
1074 DETAIL: Relation name is necessary.
1076 --------------------------------
1077 Index Scan using t1_i1 on t1 "
1079 Index Cond: (c1 = 1)
1084 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1096 --------------------
1106 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1124 --------------------
1135 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1144 ----------------------
1145 Seq Scan on t1 "Set"
1150 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1159 ----------------------
1160 Seq Scan on t1 "Set"
1164 /*+SeqScan("Set SeqScan Leading")*/
1165 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set SeqScan Leading" WHERE "Set SeqScan Leading".c1 = 1;
1168 SeqScan("Set SeqScan Leading")
1174 --------------------------------------
1175 Seq Scan on t1 "Set SeqScan Leading"
1182 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1191 ---------------------
1197 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1206 -------------------------
1207 Seq Scan on t1 "あいう"
1212 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1221 ---------------------
1227 EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1236 -------------------------
1237 Seq Scan on t1 "あいう"
1244 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;
1245 INFO: hint syntax error at or near "/**/)*/
1246 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;"
1247 DETAIL: Block comments nest doesn't supported.
1249 -------------------------------------
1250 Index Scan using t1_i1 on t1 "/**/"
1251 Index Cond: (c1 = 1)
1254 /*+SeqScan(/**//**//**/)*/
1255 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;
1256 INFO: hint syntax error at or near "/**//**//**/)*/
1257 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;"
1258 DETAIL: Block comments nest doesn't supported.
1260 ---------------------------------------------
1261 Index Scan using t1_i1 on t1 "/**//**//**/"
1262 Index Cond: (c1 = 1)
1269 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1270 Set/**/あ" WHERE "tT()""
1272 INFO: hint syntax error at or near "/**/あ")*/
1273 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1274 Set/**/あ" WHERE "tT()""
1276 DETAIL: Block comments nest doesn't supported.
1278 ------------------------------------------
1279 Index Scan using t1_i1 on t1 "tT()""
1281 Index Cond: (c1 = 1)
1287 EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1299 --------------------------
1300 Seq Scan on t1 "tT()""
1306 ---- No. A-5-6 hint parse error
1309 /*+Set(enable_indexscan off)Set enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1310 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1311 INFO: hint syntax error at or near "enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1312 DETAIL: Opened parenthesis is necessary.
1315 Set(enable_indexscan off)
1321 ----------------------------------
1322 Bitmap Heap Scan on t1
1323 Recheck Cond: (c1 = 1)
1324 -> Bitmap Index Scan on t1_i1
1325 Index Cond: (c1 = 1)
1329 /*+Set(enable_indexscan off)Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)*/
1330 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1331 INFO: hint syntax error at or near "Set(enable_bitmapscan off)SeqScan(t1)"
1332 DETAIL: Closed parenthesis is necessary.
1335 Set(enable_indexscan off)
1341 ----------------------------------
1342 Bitmap Heap Scan on t1
1343 Recheck Cond: (c1 = 1)
1344 -> Bitmap Index Scan on t1_i1
1345 Index Cond: (c1 = 1)
1349 /*+Set(enable_indexscan off)Set(enable_tidscan "off)Set(enable_bitmapscan off)SeqScan(t1)*/
1350 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1351 INFO: hint syntax error at or near ""
1352 DETAIL: Unterminated quoted parameter value.
1355 Set(enable_indexscan off)
1361 ----------------------------------
1362 Bitmap Heap Scan on t1
1363 Recheck Cond: (c1 = 1)
1364 -> Bitmap Index Scan on t1_i1
1365 Index Cond: (c1 = 1)
1369 /*+Set(enable_indexscan off)SeqScan("")Set(enable_bitmapscan off)*/
1370 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1371 INFO: hint syntax error at or near ")Set(enable_bitmapscan off)"
1372 DETAIL: Relation name is necessary.
1375 Set(enable_indexscan off)
1381 ----------------------------------
1382 Bitmap Heap Scan on t1
1383 Recheck Cond: (c1 = 1)
1384 -> Bitmap Index Scan on t1_i1
1385 Index Cond: (c1 = 1)
1389 /*+Set(enable_indexscan off)NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1390 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1391 INFO: hint syntax error at or near "NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1392 DETAIL: Keyword "NoSet" does not exist.
1395 Set(enable_indexscan off)
1401 ----------------------------------
1402 Bitmap Heap Scan on t1
1403 Recheck Cond: (c1 = 1)
1404 -> Bitmap Index Scan on t1_i1
1405 Index Cond: (c1 = 1)
1409 /*+Set(enable_indexscan off)"Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1410 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1411 INFO: hint syntax error at or near ""Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1412 DETAIL: Keyword ""Set"" does not exist.
1415 Set(enable_indexscan off)
1421 ----------------------------------
1422 Bitmap Heap Scan on t1
1423 Recheck Cond: (c1 = 1)
1424 -> Bitmap Index Scan on t1_i1
1425 Index Cond: (c1 = 1)
1429 /*+Set(enable_indexscan off)Set(enable_tidscan /* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1430 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1431 INFO: hint syntax error at or near "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1432 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
1433 DETAIL: Block comments nest doesn't supported.
1435 ------------------------------
1436 Index Scan using t1_i1 on t1
1437 Index Cond: (c1 = 1)
1441 ---- No. A-6-1 original GUC parameter
1444 SET ROLE super_user;
1445 SET pg_hint_plan.debug_print TO off;
1446 SHOW pg_hint_plan.enable;
1448 ---------------------
1452 SHOW pg_hint_plan.debug_print;
1453 pg_hint_plan.debug_print
1454 --------------------------
1458 SHOW pg_hint_plan.parse_messages;
1459 pg_hint_plan.parse_messages
1460 -----------------------------
1464 SET pg_hint_plan.enable TO off;
1465 SET pg_hint_plan.debug_print TO on;
1466 SET pg_hint_plan.parse_messages TO error;
1467 SHOW pg_hint_plan.enable;
1469 ---------------------
1473 SHOW pg_hint_plan.debug_print;
1474 pg_hint_plan.debug_print
1475 --------------------------
1479 SHOW pg_hint_plan.parse_messages;
1480 pg_hint_plan.parse_messages
1481 -----------------------------
1485 RESET pg_hint_plan.enable;
1486 RESET pg_hint_plan.debug_print;
1487 RESET pg_hint_plan.parse_messages;
1488 SHOW pg_hint_plan.enable;
1490 ---------------------
1494 SHOW pg_hint_plan.debug_print;
1495 pg_hint_plan.debug_print
1496 --------------------------
1500 SHOW pg_hint_plan.parse_messages;
1501 pg_hint_plan.parse_messages
1502 -----------------------------
1507 SET ROLE normal_user;
1508 SHOW pg_hint_plan.enable;
1510 ---------------------
1514 SHOW pg_hint_plan.debug_print;
1515 pg_hint_plan.debug_print
1516 --------------------------
1520 SHOW pg_hint_plan.parse_messages;
1521 pg_hint_plan.parse_messages
1522 -----------------------------
1526 SET pg_hint_plan.enable TO off;
1527 SET pg_hint_plan.debug_print TO on;
1528 SET pg_hint_plan.parse_messages TO error;
1529 SHOW pg_hint_plan.enable;
1531 ---------------------
1535 SHOW pg_hint_plan.debug_print;
1536 pg_hint_plan.debug_print
1537 --------------------------
1541 SHOW pg_hint_plan.parse_messages;
1542 pg_hint_plan.parse_messages
1543 -----------------------------
1547 RESET pg_hint_plan.enable;
1548 RESET pg_hint_plan.debug_print;
1549 RESET pg_hint_plan.parse_messages;
1550 SHOW pg_hint_plan.enable;
1552 ---------------------
1556 SHOW pg_hint_plan.debug_print;
1557 pg_hint_plan.debug_print
1558 --------------------------
1562 SHOW pg_hint_plan.parse_messages;
1563 pg_hint_plan.parse_messages
1564 -----------------------------
1570 ---- No. A-6-2 original GUC parameter pg_hint_plan.enable
1573 SET pg_hint_plan.enable TO on;
1574 SHOW pg_hint_plan.enable;
1576 ---------------------
1580 /*+Set(enable_indexscan off)*/
1581 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1583 ----------------------------------
1584 Bitmap Heap Scan on t1
1585 Recheck Cond: (c1 = 1)
1586 -> Bitmap Index Scan on t1_i1
1587 Index Cond: (c1 = 1)
1591 SET pg_hint_plan.enable TO off;
1592 SHOW pg_hint_plan.enable;
1594 ---------------------
1598 /*+Set(enable_indexscan off)*/
1599 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1601 ------------------------------
1602 Index Scan using t1_i1 on t1
1603 Index Cond: (c1 = 1)
1607 SET pg_hint_plan.enable TO DEFAULT;
1608 SHOW pg_hint_plan.enable;
1610 ---------------------
1614 /*+Set(enable_indexscan off)*/
1615 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1617 ----------------------------------
1618 Bitmap Heap Scan on t1
1619 Recheck Cond: (c1 = 1)
1620 -> Bitmap Index Scan on t1_i1
1621 Index Cond: (c1 = 1)
1625 SET pg_hint_plan.enable TO enable;
1626 ERROR: parameter "pg_hint_plan.enable" requires a Boolean value
1627 SHOW pg_hint_plan.enable;
1629 ---------------------
1634 ---- No. A-6-3 original GUC parameter pg_hint_plan.debug_print
1637 SET pg_hint_plan.debug_print TO on;
1638 SHOW pg_hint_plan.debug_print;
1639 pg_hint_plan.debug_print
1640 --------------------------
1644 /*+Set(enable_indexscan off)*/
1645 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1648 Set(enable_indexscan off)
1654 ----------------------------------
1655 Bitmap Heap Scan on t1
1656 Recheck Cond: (c1 = 1)
1657 -> Bitmap Index Scan on t1_i1
1658 Index Cond: (c1 = 1)
1662 SET pg_hint_plan.debug_print TO off;
1663 SHOW pg_hint_plan.debug_print;
1664 pg_hint_plan.debug_print
1665 --------------------------
1669 /*+Set(enable_indexscan off)*/
1670 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1672 ----------------------------------
1673 Bitmap Heap Scan on t1
1674 Recheck Cond: (c1 = 1)
1675 -> Bitmap Index Scan on t1_i1
1676 Index Cond: (c1 = 1)
1680 SET pg_hint_plan.debug_print TO DEFAULT;
1681 SHOW pg_hint_plan.debug_print;
1682 pg_hint_plan.debug_print
1683 --------------------------
1687 /*+Set(enable_indexscan off)*/
1688 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1690 ----------------------------------
1691 Bitmap Heap Scan on t1
1692 Recheck Cond: (c1 = 1)
1693 -> Bitmap Index Scan on t1_i1
1694 Index Cond: (c1 = 1)
1698 SET pg_hint_plan.debug_print TO enable;
1699 ERROR: parameter "pg_hint_plan.debug_print" requires a Boolean value
1700 SHOW pg_hint_plan.debug_print;
1701 pg_hint_plan.debug_print
1702 --------------------------
1707 ---- No. A-6-4 original GUC parameter pg_hint_plan.parse_messages
1709 SET client_min_messages TO debug5;
1710 DEBUG: CommitTransactionCommand
1711 DEBUG: CommitTransaction
1712 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1714 SET pg_hint_plan.parse_messages TO debug5;
1715 DEBUG: StartTransactionCommand
1716 DEBUG: StartTransaction
1717 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1718 DEBUG: ProcessUtility
1719 DEBUG: CommitTransactionCommand
1720 DEBUG: CommitTransaction
1721 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1722 SHOW pg_hint_plan.parse_messages;
1723 DEBUG: StartTransactionCommand
1724 DEBUG: StartTransaction
1725 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1726 DEBUG: ProcessUtility
1727 DEBUG: CommitTransactionCommand
1728 DEBUG: CommitTransaction
1729 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1730 pg_hint_plan.parse_messages
1731 -----------------------------
1736 DEBUG: StartTransactionCommand
1737 DEBUG: StartTransaction
1738 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1739 DEBUG: hint syntax error at or near ""
1740 DETAIL: Opened parenthesis is necessary.
1741 DEBUG: CommitTransactionCommand
1742 DEBUG: CommitTransaction
1743 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1749 SET client_min_messages TO debug4;
1750 DEBUG: StartTransactionCommand
1751 DEBUG: StartTransaction
1752 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1753 DEBUG: ProcessUtility
1754 DEBUG: CommitTransactionCommand
1755 DEBUG: CommitTransaction
1756 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1758 DEBUG: StartTransactionCommand
1759 DEBUG: StartTransaction
1760 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1761 DEBUG: CommitTransactionCommand
1762 DEBUG: CommitTransaction
1763 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1770 SET pg_hint_plan.parse_messages TO debug4;
1771 DEBUG: StartTransactionCommand
1772 DEBUG: StartTransaction
1773 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1774 DEBUG: ProcessUtility
1775 DEBUG: CommitTransactionCommand
1776 DEBUG: CommitTransaction
1777 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1778 SHOW pg_hint_plan.parse_messages;
1779 DEBUG: StartTransactionCommand
1780 DEBUG: StartTransaction
1781 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1782 DEBUG: ProcessUtility
1783 DEBUG: CommitTransactionCommand
1784 DEBUG: CommitTransaction
1785 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1786 pg_hint_plan.parse_messages
1787 -----------------------------
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: hint syntax error at or near ""
1796 DETAIL: Opened parenthesis is necessary.
1797 DEBUG: CommitTransactionCommand
1798 DEBUG: CommitTransaction
1799 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1805 SET client_min_messages TO debug3;
1806 DEBUG: StartTransactionCommand
1807 DEBUG: StartTransaction
1808 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1809 DEBUG: ProcessUtility
1810 DEBUG: CommitTransactionCommand
1811 DEBUG: CommitTransaction
1812 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1814 DEBUG: StartTransactionCommand
1815 DEBUG: StartTransaction
1816 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1817 DEBUG: CommitTransactionCommand
1818 DEBUG: CommitTransaction
1819 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1826 SET pg_hint_plan.parse_messages TO debug3;
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:
1834 SHOW pg_hint_plan.parse_messages;
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: ProcessUtility
1839 DEBUG: CommitTransactionCommand
1840 DEBUG: CommitTransaction
1841 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1842 pg_hint_plan.parse_messages
1843 -----------------------------
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: hint syntax error at or near ""
1852 DETAIL: Opened parenthesis is necessary.
1853 DEBUG: CommitTransactionCommand
1854 DEBUG: CommitTransaction
1855 DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1861 SET client_min_messages TO debug2;
1862 DEBUG: StartTransactionCommand
1863 DEBUG: StartTransaction
1864 DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1865 DEBUG: ProcessUtility
1873 SET pg_hint_plan.parse_messages TO debug2;
1874 SHOW pg_hint_plan.parse_messages;
1875 pg_hint_plan.parse_messages
1876 -----------------------------
1881 DEBUG: hint syntax error at or near ""
1882 DETAIL: Opened parenthesis is necessary.
1888 SET client_min_messages TO debug1;
1896 SET pg_hint_plan.parse_messages TO debug1;
1897 SHOW pg_hint_plan.parse_messages;
1898 pg_hint_plan.parse_messages
1899 -----------------------------
1904 DEBUG: hint syntax error at or near ""
1905 DETAIL: Opened parenthesis is necessary.
1911 SET client_min_messages TO log;
1919 SET pg_hint_plan.parse_messages TO log;
1920 SHOW pg_hint_plan.parse_messages;
1921 pg_hint_plan.parse_messages
1922 -----------------------------
1927 LOG: hint syntax error at or near ""
1928 DETAIL: Opened parenthesis is necessary.
1934 SET client_min_messages TO info;
1942 SET pg_hint_plan.parse_messages TO info;
1943 SHOW pg_hint_plan.parse_messages;
1944 pg_hint_plan.parse_messages
1945 -----------------------------
1950 INFO: hint syntax error at or near ""
1951 DETAIL: Opened parenthesis is necessary.
1957 SET client_min_messages TO notice;
1959 INFO: hint syntax error at or near ""
1960 DETAIL: Opened parenthesis is necessary.
1967 SET pg_hint_plan.parse_messages TO notice;
1968 SHOW pg_hint_plan.parse_messages;
1969 pg_hint_plan.parse_messages
1970 -----------------------------
1975 NOTICE: hint syntax error at or near ""
1976 DETAIL: Opened parenthesis is necessary.
1982 SET client_min_messages TO warning;
1990 SET pg_hint_plan.parse_messages TO warning;
1991 SHOW pg_hint_plan.parse_messages;
1992 pg_hint_plan.parse_messages
1993 -----------------------------
1998 WARNING: hint syntax error at or near ""
1999 DETAIL: Opened parenthesis is necessary.
2005 SET client_min_messages TO error;
2013 SET pg_hint_plan.parse_messages TO error;
2014 SHOW pg_hint_plan.parse_messages;
2015 pg_hint_plan.parse_messages
2016 -----------------------------
2021 ERROR: hint syntax error at or near ""
2022 DETAIL: Opened parenthesis is necessary.
2023 SET client_min_messages TO fatal;
2026 RESET client_min_messages;
2027 SET pg_hint_plan.parse_messages TO DEFAULT;
2028 SHOW pg_hint_plan.parse_messages;
2029 pg_hint_plan.parse_messages
2030 -----------------------------
2035 INFO: hint syntax error at or near ""
2036 DETAIL: Opened parenthesis is necessary.
2043 SET pg_hint_plan.parse_messages TO fatal;
2044 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "fatal"
2045 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2046 SHOW pg_hint_plan.parse_messages;
2047 pg_hint_plan.parse_messages
2048 -----------------------------
2053 SET pg_hint_plan.parse_messages TO panic;
2054 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "panic"
2055 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2056 SHOW pg_hint_plan.parse_messages;
2057 pg_hint_plan.parse_messages
2058 -----------------------------
2063 SET pg_hint_plan.parse_messages TO on;
2064 ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "on"
2065 HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2066 SHOW pg_hint_plan.parse_messages;
2067 pg_hint_plan.parse_messages
2068 -----------------------------
2073 ---- No. A-7-1 parse error message output
2076 /*+"Set"(enable_indexscan on)*/SELECT 1;
2077 INFO: hint syntax error at or near ""Set"(enable_indexscan on)"
2078 DETAIL: Keyword ""Set"" does not exist.
2084 /*+Set()(enable_indexscan on)*/SELECT 1;
2085 INFO: hint syntax error at or near ")(enable_indexscan on)"
2086 DETAIL: Parameter name is necessary.
2092 /*+Set(enable_indexscan on*/SELECT 1;
2093 INFO: hint syntax error at or near ""
2094 DETAIL: Closed parenthesis is necessary.
2101 ---- No. A-7-3 hint state output
2103 SET pg_hint_plan.debug_print TO on;
2104 SET client_min_messages TO LOG;
2107 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2116 --------------------
2122 /*+SeqScan(no_table)*/
2123 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2132 ------------------------------
2133 Index Scan using t1_i1 on t1
2134 Index Cond: (c1 = 1)
2138 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2140 -----------------------------------
2142 TID Cond: (ctid = '(1,1)'::tid)
2146 /*+TidScan(t1)BitmapScan(t1)*/
2147 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2148 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)"
2149 DETAIL: Conflict scan method hint.
2159 ----------------------------------
2160 Bitmap Heap Scan on t1
2161 Recheck Cond: (c1 = 1)
2162 Filter: (ctid = '(1,1)'::tid)
2163 -> Bitmap Index Scan on t1_i1
2164 Index Cond: (c1 = 1)
2167 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)*/
2168 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2169 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)"
2170 DETAIL: Conflict scan method hint.
2171 INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)"
2172 DETAIL: Conflict scan method hint.
2183 ---------------------------------
2184 Index Scan using t1_i1 on t1
2185 Index Cond: (c1 = 1)
2186 Filter: (ctid = '(1,1)'::tid)
2189 /*+TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)*/
2190 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2191 INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2192 DETAIL: Conflict scan method hint.
2193 INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2194 DETAIL: Conflict scan method hint.
2195 INFO: hint syntax error at or near "IndexScan(t1)SeqScan(t1)"
2196 DETAIL: Conflict scan method hint.
2208 ------------------------------------------------
2210 Filter: ((c1 = 1) AND (ctid = '(1,1)'::tid))
2214 /*+Set(enable_indexscan enable)*/
2215 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2216 INFO: parameter "enable_indexscan" requires a Boolean value
2222 Set(enable_indexscan enable)
2225 ------------------------------
2226 Index Scan using t1_i1 on t1
2227 Index Cond: (c1 = 1)
2231 ---- No. A-8-1 hint state output
2233 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2234 EXPLAIN (COSTS false) EXECUTE p1;
2236 ------------------------------
2237 Index Scan using t1_i1 on t1
2238 Index Cond: (c1 = 1)
2242 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2243 EXPLAIN (COSTS false) EXECUTE p1 (1);
2245 ---------------------
2254 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2263 EXPLAIN (COSTS false) EXECUTE p1;
2265 --------------------
2270 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2272 EXPLAIN (COSTS false) EXECUTE p1;
2281 --------------------
2288 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2297 EXPLAIN (COSTS false) EXECUTE p1 (1);
2299 ----------------------------------
2300 Bitmap Heap Scan on t1
2301 Recheck Cond: (c1 < $1)
2302 -> Bitmap Index Scan on t1_i1
2303 Index Cond: (c1 < $1)
2306 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2308 EXPLAIN (COSTS false) EXECUTE p1 (1);
2317 ----------------------------------
2318 Bitmap Heap Scan on t1
2319 Recheck Cond: (c1 < $1)
2320 -> Bitmap Index Scan on t1_i1
2321 Index Cond: (c1 < $1)
2328 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2336 EXPLAIN (COSTS false) EXECUTE p1;
2338 --------------------
2343 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2344 EXPLAIN (COSTS false) EXECUTE p1;
2353 --------------------
2360 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2368 EXPLAIN (COSTS false) EXECUTE p1 (1);
2370 ----------------------------------
2371 Bitmap Heap Scan on t1
2372 Recheck Cond: (c1 < $1)
2373 -> Bitmap Index Scan on t1_i1
2374 Index Cond: (c1 < $1)
2377 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2378 EXPLAIN (COSTS false) EXECUTE p1 (1);
2387 ----------------------------------
2388 Bitmap Heap Scan on t1
2389 Recheck Cond: (c1 < $1)
2390 -> Bitmap Index Scan on t1_i1
2391 Index Cond: (c1 < $1)
2397 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2399 EXPLAIN (COSTS false) EXECUTE p1;
2401 ------------------------------
2402 Index Scan using t1_i1 on t1
2403 Index Cond: (c1 = 1)
2406 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2408 EXPLAIN (COSTS false) EXECUTE p1;
2410 ------------------------------
2411 Index Scan using t1_i1 on t1
2412 Index Cond: (c1 = 1)
2416 PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2418 EXPLAIN (COSTS false) EXECUTE p1 (1);
2420 ---------------------
2425 UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2427 EXPLAIN (COSTS false) EXECUTE p1 (1);
2429 ---------------------
2436 ---- No. A-8-4 EXECUTE statement name error
2440 ERROR: prepared statement "p1" does not exist
2441 SHOW pg_hint_plan.debug_print;
2442 pg_hint_plan.debug_print
2443 --------------------------
2448 ---- No. A-9-5 EXECUTE statement name error
2451 SELECT pg_stat_statements_reset();
2452 pg_stat_statements_reset
2453 --------------------------
2457 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2463 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2466 Set(enable_seqscan off)
2476 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2489 SELECT s.query, s.calls
2490 FROM public.pg_stat_statements s
2491 JOIN pg_catalog.pg_database d
2495 -------------------------------------------------------------------+-------
2496 /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
2497 /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
2498 SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
2499 SELECT pg_stat_statements_reset(); | 1
2503 ---- No. A-10-1 duplicate hint
2506 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
2508 -----------------------------------------------------
2510 Join Filter: (t1.c1 = t4.c1)
2512 Join Filter: (t1.c1 = t3.c1)
2514 Join Filter: (t1.c1 = t2.c1)
2516 TID Cond: (ctid = '(1,1)'::tid)
2518 Filter: (ctid = '(1,1)'::tid)
2520 TID Cond: (ctid = '(1,1)'::tid)
2522 TID Cond: (ctid = '(1,1)'::tid)
2526 Set(enable_tidscan aaa)
2527 Set(enable_tidscan on)
2528 Set(enable_tidscan off)
2536 Leading(t2 t1 t4 t3)
2537 Leading(t1 t4 t3 t2)
2538 Leading(t4 t3 t2 t1)
2540 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
2541 INFO: hint syntax error at or near "SeqScan(t4)
2548 Leading(t2 t1 t4 t3)
2549 Leading(t1 t4 t3 t2)
2550 Leading(t4 t3 t2 t1)
2552 DETAIL: Conflict scan method hint.
2553 INFO: hint syntax error at or near "IndexScan(t4)
2559 Leading(t2 t1 t4 t3)
2560 Leading(t1 t4 t3 t2)
2561 Leading(t4 t3 t2 t1)
2563 DETAIL: Conflict scan method hint.
2564 INFO: hint syntax error at or near "BitmapScan(t4)
2569 Leading(t2 t1 t4 t3)
2570 Leading(t1 t4 t3 t2)
2571 Leading(t4 t3 t2 t1)
2573 DETAIL: Conflict scan method hint.
2574 INFO: hint syntax error at or near "NestLoop(t4 t3)
2577 Leading(t2 t1 t4 t3)
2578 Leading(t1 t4 t3 t2)
2579 Leading(t4 t3 t2 t1)
2581 DETAIL: Conflict join method hint.
2582 INFO: hint syntax error at or near "MergeJoin(t4 t3)
2584 Leading(t2 t1 t4 t3)
2585 Leading(t1 t4 t3 t2)
2586 Leading(t4 t3 t2 t1)
2588 DETAIL: Conflict join method hint.
2589 INFO: hint syntax error at or near "Leading(t2 t1 t4 t3)
2590 Leading(t1 t4 t3 t2)
2591 Leading(t4 t3 t2 t1)
2593 DETAIL: Conflict leading hint.
2594 INFO: hint syntax error at or near "Leading(t1 t4 t3 t2)
2595 Leading(t4 t3 t2 t1)
2597 DETAIL: Conflict leading hint.
2598 INFO: hint syntax error at or near "Set(enable_tidscan aaa)
2599 Set(enable_tidscan on)
2600 Set(enable_tidscan off)
2608 Leading(t2 t1 t4 t3)
2609 Leading(t1 t4 t3 t2)
2610 Leading(t4 t3 t2 t1)
2612 DETAIL: Conflict set hint.
2613 INFO: hint syntax error at or near "Set(enable_tidscan on)
2614 Set(enable_tidscan off)
2622 Leading(t2 t1 t4 t3)
2623 Leading(t1 t4 t3 t2)
2624 Leading(t4 t3 t2 t1)
2626 DETAIL: Conflict set hint.
2631 Leading(t4 t3 t2 t1)
2632 Set(enable_tidscan off)
2640 Leading(t2 t1 t4 t3)
2641 Leading(t1 t4 t3 t2)
2642 Set(enable_tidscan aaa)
2643 Set(enable_tidscan on)
2647 -----------------------------------------------------------
2650 Join Filter: (t3.c1 = t2.c1)
2652 Hash Cond: (t3.c1 = t4.c1)
2654 Filter: (ctid = '(1,1)'::tid)
2657 TID Cond: (ctid = '(1,1)'::tid)
2659 Filter: (ctid = '(1,1)'::tid)
2660 -> Index Scan using t1_i1 on t1
2661 Index Cond: (c1 = t2.c1)
2662 Filter: (ctid = '(1,1)'::tid)
2666 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
2668 -----------------------------------------------------
2670 Join Filter: (t1.c1 = t4.c1)
2672 Join Filter: (t1.c1 = t3.c1)
2674 Join Filter: (t1.c1 = t2.c1)
2676 TID Cond: (ctid = '(1,1)'::tid)
2678 Filter: (ctid = '(1,1)'::tid)
2680 TID Cond: (ctid = '(1,1)'::tid)
2682 TID Cond: (ctid = '(1,1)'::tid)
2687 Set(enable_tidscan aaa)
2690 Leading(t2 t1 t4 t3)
2691 Set(enable_tidscan on)
2694 Leading(t1 t4 t3 t2)
2695 Set(enable_tidscan off)
2698 Leading(t4 t3 t2 t1)
2700 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.ctid = '(1,1)' AND t1.c1 = t2.c1 AND t2.ctid = '(1,1)' AND t1.c1 = t3.c1 AND t3.ctid = '(1,1)' AND t1.c1 = t4.c1 AND t4.ctid = '(1,1)';
2701 INFO: hint syntax error at or near "SeqScan(t4)
2702 Set(enable_tidscan aaa)
2705 Leading(t2 t1 t4 t3)
2706 Set(enable_tidscan on)
2709 Leading(t1 t4 t3 t2)
2710 Set(enable_tidscan off)
2713 Leading(t4 t3 t2 t1)
2715 DETAIL: Conflict scan method hint.
2716 INFO: hint syntax error at or near "IndexScan(t4)
2718 Leading(t2 t1 t4 t3)
2719 Set(enable_tidscan on)
2722 Leading(t1 t4 t3 t2)
2723 Set(enable_tidscan off)
2726 Leading(t4 t3 t2 t1)
2728 DETAIL: Conflict scan method hint.
2729 INFO: hint syntax error at or near "BitmapScan(t4)
2731 Leading(t1 t4 t3 t2)
2732 Set(enable_tidscan off)
2735 Leading(t4 t3 t2 t1)
2737 DETAIL: Conflict scan method hint.
2738 INFO: hint syntax error at or near "NestLoop(t4 t3)
2739 Leading(t2 t1 t4 t3)
2740 Set(enable_tidscan on)
2743 Leading(t1 t4 t3 t2)
2744 Set(enable_tidscan off)
2747 Leading(t4 t3 t2 t1)
2749 DETAIL: Conflict join method hint.
2750 INFO: hint syntax error at or near "MergeJoin(t4 t3)
2751 Leading(t1 t4 t3 t2)
2752 Set(enable_tidscan off)
2755 Leading(t4 t3 t2 t1)
2757 DETAIL: Conflict join method hint.
2758 INFO: hint syntax error at or near "Leading(t2 t1 t4 t3)
2759 Set(enable_tidscan on)
2762 Leading(t1 t4 t3 t2)
2763 Set(enable_tidscan off)
2766 Leading(t4 t3 t2 t1)
2768 DETAIL: Conflict leading hint.
2769 INFO: hint syntax error at or near "Leading(t1 t4 t3 t2)
2770 Set(enable_tidscan off)
2773 Leading(t4 t3 t2 t1)
2775 DETAIL: Conflict leading hint.
2776 INFO: hint syntax error at or near "Set(enable_tidscan aaa)
2779 Leading(t2 t1 t4 t3)
2780 Set(enable_tidscan on)
2783 Leading(t1 t4 t3 t2)
2784 Set(enable_tidscan off)
2787 Leading(t4 t3 t2 t1)
2789 DETAIL: Conflict set hint.
2790 INFO: hint syntax error at or near "Set(enable_tidscan on)
2793 Leading(t1 t4 t3 t2)
2794 Set(enable_tidscan off)
2797 Leading(t4 t3 t2 t1)
2799 DETAIL: Conflict set hint.
2804 Leading(t4 t3 t2 t1)
2805 Set(enable_tidscan off)
2813 Leading(t2 t1 t4 t3)
2814 Leading(t1 t4 t3 t2)
2815 Set(enable_tidscan aaa)
2816 Set(enable_tidscan on)
2820 -----------------------------------------------------------
2823 Join Filter: (t3.c1 = t2.c1)
2825 Hash Cond: (t3.c1 = t4.c1)
2827 Filter: (ctid = '(1,1)'::tid)
2830 TID Cond: (ctid = '(1,1)'::tid)
2832 Filter: (ctid = '(1,1)'::tid)
2833 -> Index Scan using t1_i1 on t1
2834 Index Cond: (c1 = t2.c1)
2835 Filter: (ctid = '(1,1)'::tid)
2839 ---- No. A-10-2 restrict query type
2842 EXPLAIN (COSTS false) SELECT * FROM s1.t1 FULL OUTER JOIN s1.t2 ON (t1.c1 = t2.c1);
2844 ------------------------------
2846 Hash Cond: (t1.c1 = t2.c1)
2852 /*+HashJoin(t1 t2)*/
2853 EXPLAIN (COSTS false) SELECT * FROM s1.t1 FULL OUTER JOIN s1.t2 ON (t1.c1 = t2.c1);
2862 ------------------------------
2864 Hash Cond: (t1.c1 = t2.c1)
2870 /*+MergeJoin(t1 t2)*/
2871 EXPLAIN (COSTS false) SELECT * FROM s1.t1 FULL OUTER JOIN s1.t2 ON (t1.c1 = t2.c1);
2880 ------------------------------------
2882 Merge Cond: (t1.c1 = t2.c1)
2883 -> Index Scan using t1_i1 on t1
2889 /*+NestLoop(t1 t2)*/
2890 EXPLAIN (COSTS true) SELECT * FROM s1.t1 FULL OUTER JOIN s1.t2 ON (t1.c1 = t2.c1);
2899 --------------------------------------------------------------------------
2900 Hash Full Join (cost=10000000003.25..10000000024.00 rows=1000 width=29)
2901 Hash Cond: (t1.c1 = t2.c1)
2902 -> Seq Scan on t1 (cost=0.00..16.00 rows=1000 width=15)
2903 -> Hash (cost=2.00..2.00 rows=100 width=14)
2904 -> Seq Scan on t2 (cost=0.00..2.00 rows=100 width=14)
2908 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c3 = 1 AND t1.ctid = '(1,1)';
2910 -----------------------------------
2912 TID Cond: (ctid = '(1,1)'::tid)
2917 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c3 = 1 AND t1.ctid = '(1,1)';
2926 ---------------------------------
2927 Index Scan using t1_i on t1
2928 Index Cond: (c3 = 1)
2929 Filter: (ctid = '(1,1)'::tid)
2932 /*+IndexScan(t1 t1_i)*/
2933 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c3 = 1 AND t1.ctid = '(1,1)';
2942 ---------------------------------
2943 Index Scan using t1_i on t1
2944 Index Cond: (c3 = 1)
2945 Filter: (ctid = '(1,1)'::tid)
2948 /*+IndexScan(t1 t1_i1)*/
2949 EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c3 = 1 AND t1.ctid = '(1,1)';
2958 -----------------------------------------------------------------------
2959 Tid Scan on t1 (cost=10000000000.00..10000000004.02 rows=1 width=15)
2960 TID Cond: (ctid = '(1,1)'::tid)
2965 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2967 ------------------------------
2968 Index Scan using t1_i1 on t1
2969 Index Cond: (c1 = 1)
2973 EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2982 -----------------------------------------------------------------------
2983 Seq Scan on t1 (cost=10000000000.00..10000000018.50 rows=1 width=15)
2988 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2997 -----------------------------------
2999 TID Cond: (ctid = '(1,1)'::tid)
3004 ---- No. A-10-3 VIEW, RULE multi specified
3007 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
3009 ----------------------------------
3011 Hash Cond: (v1t1.c1 = v1t1.c1)
3012 -> Seq Scan on t1 v1t1
3014 -> Seq Scan on t1 v1t1
3017 /*+Leading(v1t1 v1t1)HashJoin(v1t1 v1t1)BitmapScan(v1t1)*/
3018 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
3019 INFO: hint syntax error at or near "HashJoin(v1t1 v1t1)BitmapScan(v1t1)"
3020 DETAIL: Relation name "v1t1" is ambiguous.
3021 INFO: hint syntax error at or near "Leading(v1t1 v1t1)HashJoin(v1t1 v1t1)BitmapScan(v1t1)"
3022 DETAIL: Relation name "v1t1" is ambiguous.
3033 ------------------------------------------
3035 -> Index Scan using t1_i1 on t1 v1t1
3036 -> Bitmap Heap Scan on t1 v1t1
3037 Recheck Cond: (c1 = v1t1.c1)
3038 -> Bitmap Index Scan on t1_i1
3039 Index Cond: (c1 = v1t1.c1)
3043 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
3045 -----------------------------------
3047 Hash Cond: (v1t1.c1 = v1t1_.c1)
3048 -> Seq Scan on t1 v1t1
3050 -> Seq Scan on t1 v1t1_
3053 /*+Leading(v1t1 v1t1_)NestLoop(v1t1 v1t1_)SeqScan(v1t1)BitmapScan(v1t1_)*/
3054 EXPLAIN (COSTS false) SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
3059 NestLoop(v1t1 v1t1_)
3066 ------------------------------------------
3068 -> Seq Scan on t1 v1t1
3069 -> Bitmap Heap Scan on t1 v1t1_
3070 Recheck Cond: (c1 = v1t1.c1)
3071 -> Bitmap Index Scan on t1_i1
3072 Index Cond: (c1 = v1t1.c1)
3076 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
3078 ----------------------------------
3080 Hash Cond: (r4t1.c1 = r4t1.c1)
3081 -> Seq Scan on t1 r4t1
3083 -> Seq Scan on t1 r4t1
3086 /*+Leading(r4t1 r4t1)HashJoin(r4t1 r4t1)BitmapScan(r4t1)*/
3087 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
3088 INFO: hint syntax error at or near "HashJoin(r4t1 r4t1)BitmapScan(r4t1)"
3089 DETAIL: Relation name "r4t1" is ambiguous.
3090 INFO: hint syntax error at or near "Leading(r4t1 r4t1)HashJoin(r4t1 r4t1)BitmapScan(r4t1)"
3091 DETAIL: Relation name "r4t1" is ambiguous.
3102 ------------------------------------------
3104 -> Index Scan using t1_i1 on t1 r4t1
3105 -> Bitmap Heap Scan on t1 r4t1
3106 Recheck Cond: (c1 = r4t1.c1)
3107 -> Bitmap Index Scan on t1_i1
3108 Index Cond: (c1 = r4t1.c1)
3112 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
3114 ----------------------------------
3116 Hash Cond: (r4t1.c1 = r5t1.c1)
3117 -> Seq Scan on t1 r4t1
3119 -> Seq Scan on t1 r5t1
3122 /*+Leading(r4t1 r5t1)NestLoop(r4t1 r5t1)SeqScan(r4t1)BitmapScan(r5t1)*/
3123 EXPLAIN (COSTS false) SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
3135 ------------------------------------------
3137 -> Seq Scan on t1 r4t1
3138 -> Bitmap Heap Scan on t1 r5t1
3139 Recheck Cond: (c1 = r4t1.c1)
3140 -> Bitmap Index Scan on t1_i1
3141 Index Cond: (c1 = r4t1.c1)
3145 ---- No. A-12-1 reset of global variable of core at the error
3146 ---- No. A-12-2 reset of global variable of original at the error
3148 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3150 ------------------------------------
3152 Merge Cond: (t1.c1 = t2.c1)
3153 -> Index Scan using t1_i1 on t1
3159 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3160 PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3161 INFO: hint syntax error at or near "NestLoop(t1 t1)"
3162 DETAIL: Relation name "t1" is duplicate.
3167 Set(enable_seqscan off)
3168 Set(geqo_threshold 100)
3174 EXPLAIN (COSTS false) EXECUTE p1;
3176 ------------------------------------
3178 Merge Cond: (t1.c1 = t2.c1)
3182 -> Index Scan using t2_i1 on t2
3187 SELECT name, setting FROM settings;
3189 ---------------------------+-----------
3192 geqo_generations | 0
3195 geqo_selection_bias | 2
3197 constraint_exclusion | partition
3198 cursor_tuple_fraction | 0.1
3199 default_statistics_target | 100
3200 from_collapse_limit | 8
3201 join_collapse_limit | 8
3202 cpu_index_tuple_cost | 0.005
3203 cpu_operator_cost | 0.0025
3204 cpu_tuple_cost | 0.01
3205 effective_cache_size | 16384
3206 random_page_cost | 4
3208 enable_bitmapscan | on
3210 enable_hashjoin | on
3211 enable_indexscan | on
3212 enable_material | on
3213 enable_mergejoin | on
3214 enable_nestloop | on
3218 client_min_messages | log
3221 SET pg_hint_plan.parse_messages TO error;
3222 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3223 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3224 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3225 DETAIL: Relation name "t1" is duplicate.
3226 SELECT name, setting FROM settings;
3228 ---------------------------+-----------
3231 geqo_generations | 0
3234 geqo_selection_bias | 2
3236 constraint_exclusion | partition
3237 cursor_tuple_fraction | 0.1
3238 default_statistics_target | 100
3239 from_collapse_limit | 8
3240 join_collapse_limit | 8
3241 cpu_index_tuple_cost | 0.005
3242 cpu_operator_cost | 0.0025
3243 cpu_tuple_cost | 0.01
3244 effective_cache_size | 16384
3245 random_page_cost | 4
3247 enable_bitmapscan | on
3249 enable_hashjoin | on
3250 enable_indexscan | on
3251 enable_material | on
3252 enable_mergejoin | on
3253 enable_nestloop | on
3257 client_min_messages | log
3260 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3261 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3266 Set(enable_seqscan off)
3267 Set(geqo_threshold 100)
3273 ------------------------------------
3275 Merge Cond: (t1.c1 = t2.c1)
3279 -> Index Scan using t2_i1 on t2
3284 SELECT name, setting FROM settings;
3286 ---------------------------+-----------
3289 geqo_generations | 0
3292 geqo_selection_bias | 2
3294 constraint_exclusion | partition
3295 cursor_tuple_fraction | 0.1
3296 default_statistics_target | 100
3297 from_collapse_limit | 8
3298 join_collapse_limit | 8
3299 cpu_index_tuple_cost | 0.005
3300 cpu_operator_cost | 0.0025
3301 cpu_tuple_cost | 0.01
3302 effective_cache_size | 16384
3303 random_page_cost | 4
3305 enable_bitmapscan | on
3307 enable_hashjoin | on
3308 enable_indexscan | on
3309 enable_material | on
3310 enable_mergejoin | on
3311 enable_nestloop | on
3315 client_min_messages | log
3318 SET pg_hint_plan.parse_messages TO error;
3319 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3320 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3321 ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3322 DETAIL: Relation name "t1" is duplicate.
3323 SELECT name, setting FROM settings;
3325 ---------------------------+-----------
3328 geqo_generations | 0
3331 geqo_selection_bias | 2
3333 constraint_exclusion | partition
3334 cursor_tuple_fraction | 0.1
3335 default_statistics_target | 100
3336 from_collapse_limit | 8
3337 join_collapse_limit | 8
3338 cpu_index_tuple_cost | 0.005
3339 cpu_operator_cost | 0.0025
3340 cpu_tuple_cost | 0.01
3341 effective_cache_size | 16384
3342 random_page_cost | 4
3344 enable_bitmapscan | on
3346 enable_hashjoin | on
3347 enable_indexscan | on
3348 enable_material | on
3349 enable_mergejoin | on
3350 enable_nestloop | on
3354 client_min_messages | log
3357 EXPLAIN (COSTS false) EXECUTE p1;
3359 ------------------------------------
3361 Merge Cond: (t1.c1 = t2.c1)
3365 -> Index Scan using t2_i1 on t2
3370 SELECT name, setting FROM settings;
3372 ---------------------------+-----------
3375 geqo_generations | 0
3378 geqo_selection_bias | 2
3380 constraint_exclusion | partition
3381 cursor_tuple_fraction | 0.1
3382 default_statistics_target | 100
3383 from_collapse_limit | 8
3384 join_collapse_limit | 8
3385 cpu_index_tuple_cost | 0.005
3386 cpu_operator_cost | 0.0025
3387 cpu_tuple_cost | 0.01
3388 effective_cache_size | 16384
3389 random_page_cost | 4
3391 enable_bitmapscan | on
3393 enable_hashjoin | on
3394 enable_indexscan | on
3395 enable_material | on
3396 enable_mergejoin | on
3397 enable_nestloop | on
3401 client_min_messages | log
3404 SET pg_hint_plan.parse_messages TO error;
3405 EXPLAIN (COSTS false) EXECUTE p2;
3406 ERROR: prepared statement "p2" does not exist
3407 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3408 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3413 Set(enable_seqscan off)
3414 Set(geqo_threshold 100)
3420 ------------------------------------
3422 Merge Cond: (t1.c1 = t2.c1)
3426 -> Index Scan using t2_i1 on t2
3429 EXPLAIN (COSTS false) EXECUTE p1;
3431 ------------------------------------
3433 Merge Cond: (t1.c1 = t2.c1)
3437 -> Index Scan using t2_i1 on t2
3440 SELECT name, setting FROM settings;
3442 ---------------------------+-----------
3445 geqo_generations | 0
3448 geqo_selection_bias | 2
3450 constraint_exclusion | partition
3451 cursor_tuple_fraction | 0.1
3452 default_statistics_target | 100
3453 from_collapse_limit | 8
3454 join_collapse_limit | 8
3455 cpu_index_tuple_cost | 0.005
3456 cpu_operator_cost | 0.0025
3457 cpu_tuple_cost | 0.01
3458 effective_cache_size | 16384
3459 random_page_cost | 4
3461 enable_bitmapscan | on
3463 enable_hashjoin | on
3464 enable_indexscan | on
3465 enable_material | on
3466 enable_mergejoin | on
3467 enable_nestloop | on
3471 client_min_messages | log
3476 SELECT name, setting FROM settings;
3478 ---------------------------+-----------
3481 geqo_generations | 0
3484 geqo_selection_bias | 2
3486 constraint_exclusion | partition
3487 cursor_tuple_fraction | 0.1
3488 default_statistics_target | 100
3489 from_collapse_limit | 8
3490 join_collapse_limit | 8
3491 cpu_index_tuple_cost | 0.005
3492 cpu_operator_cost | 0.0025
3493 cpu_tuple_cost | 0.01
3494 effective_cache_size | 16384
3495 random_page_cost | 4
3497 enable_bitmapscan | on
3499 enable_hashjoin | on
3500 enable_indexscan | on
3501 enable_material | on
3502 enable_mergejoin | on
3503 enable_nestloop | on
3507 client_min_messages | log
3510 SET pg_hint_plan.parse_messages TO error;
3511 EXPLAIN (COSTS false) EXECUTE p2;
3512 ERROR: prepared statement "p2" does not exist
3513 EXPLAIN (COSTS false) EXECUTE p1;
3515 ------------------------------------
3517 Merge Cond: (t1.c1 = t2.c1)
3521 -> Index Scan using t2_i1 on t2
3524 SELECT name, setting FROM settings;
3526 ---------------------------+-----------
3529 geqo_generations | 0
3532 geqo_selection_bias | 2
3534 constraint_exclusion | partition
3535 cursor_tuple_fraction | 0.1
3536 default_statistics_target | 100
3537 from_collapse_limit | 8
3538 join_collapse_limit | 8
3539 cpu_index_tuple_cost | 0.005
3540 cpu_operator_cost | 0.0025
3541 cpu_tuple_cost | 0.01
3542 effective_cache_size | 16384
3543 random_page_cost | 4
3545 enable_bitmapscan | on
3547 enable_hashjoin | on
3548 enable_indexscan | on
3549 enable_material | on
3550 enable_mergejoin | on
3551 enable_nestloop | on
3555 client_min_messages | log
3559 SET pg_hint_plan.parse_messages TO LOG;
3561 ---- No. A-12-3 effective range of the hint
3563 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3565 ------------------------------------
3567 Merge Cond: (t1.c1 = t2.c1)
3568 -> Index Scan using t1_i1 on t1
3575 SET enable_indexscan TO off;
3576 SET enable_mergejoin TO off;
3577 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3579 ------------------------------
3581 Hash Cond: (t1.c1 = t2.c1)
3587 SELECT name, setting FROM settings;
3589 ---------------------------+-----------
3592 geqo_generations | 0
3595 geqo_selection_bias | 2
3597 constraint_exclusion | partition
3598 cursor_tuple_fraction | 0.1
3599 default_statistics_target | 100
3600 from_collapse_limit | 8
3601 join_collapse_limit | 8
3602 cpu_index_tuple_cost | 0.005
3603 cpu_operator_cost | 0.0025
3604 cpu_tuple_cost | 0.01
3605 effective_cache_size | 16384
3606 random_page_cost | 4
3608 enable_bitmapscan | on
3610 enable_hashjoin | on
3611 enable_indexscan | off
3612 enable_material | on
3613 enable_mergejoin | off
3614 enable_nestloop | on
3618 client_min_messages | log
3621 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3622 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3628 Set(enable_indexscan on)
3629 Set(geqo_threshold 100)
3635 ------------------------------------
3637 Merge Cond: (t1.c1 = t2.c1)
3638 -> Index Scan using t1_i1 on t1
3639 -> Index Scan using t2_i1 on t2
3642 SELECT name, setting FROM settings;
3644 ---------------------------+-----------
3647 geqo_generations | 0
3650 geqo_selection_bias | 2
3652 constraint_exclusion | partition
3653 cursor_tuple_fraction | 0.1
3654 default_statistics_target | 100
3655 from_collapse_limit | 8
3656 join_collapse_limit | 8
3657 cpu_index_tuple_cost | 0.005
3658 cpu_operator_cost | 0.0025
3659 cpu_tuple_cost | 0.01
3660 effective_cache_size | 16384
3661 random_page_cost | 4
3663 enable_bitmapscan | on
3665 enable_hashjoin | on
3666 enable_indexscan | off
3667 enable_material | on
3668 enable_mergejoin | off
3669 enable_nestloop | on
3673 client_min_messages | log
3676 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3678 ------------------------------
3680 Hash Cond: (t1.c1 = t2.c1)
3687 SET enable_indexscan TO off;
3688 SET enable_mergejoin TO off;
3689 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3691 ------------------------------
3693 Hash Cond: (t1.c1 = t2.c1)
3699 SELECT name, setting FROM settings;
3701 ---------------------------+-----------
3704 geqo_generations | 0
3707 geqo_selection_bias | 2
3709 constraint_exclusion | partition
3710 cursor_tuple_fraction | 0.1
3711 default_statistics_target | 100
3712 from_collapse_limit | 8
3713 join_collapse_limit | 8
3714 cpu_index_tuple_cost | 0.005
3715 cpu_operator_cost | 0.0025
3716 cpu_tuple_cost | 0.01
3717 effective_cache_size | 16384
3718 random_page_cost | 4
3720 enable_bitmapscan | on
3722 enable_hashjoin | on
3723 enable_indexscan | off
3724 enable_material | on
3725 enable_mergejoin | off
3726 enable_nestloop | on
3730 client_min_messages | log
3734 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3735 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3741 Set(enable_indexscan on)
3742 Set(geqo_threshold 100)
3748 ------------------------------------
3750 Merge Cond: (t1.c1 = t2.c1)
3751 -> Index Scan using t1_i1 on t1
3752 -> Index Scan using t2_i1 on t2
3757 SELECT name, setting FROM settings;
3759 ---------------------------+-----------
3762 geqo_generations | 0
3765 geqo_selection_bias | 2
3767 constraint_exclusion | partition
3768 cursor_tuple_fraction | 0.1
3769 default_statistics_target | 100
3770 from_collapse_limit | 8
3771 join_collapse_limit | 8
3772 cpu_index_tuple_cost | 0.005
3773 cpu_operator_cost | 0.0025
3774 cpu_tuple_cost | 0.01
3775 effective_cache_size | 16384
3776 random_page_cost | 4
3778 enable_bitmapscan | on
3780 enable_hashjoin | on
3781 enable_indexscan | off
3782 enable_material | on
3783 enable_mergejoin | off
3784 enable_nestloop | on
3788 client_min_messages | log
3791 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3793 ------------------------------
3795 Hash Cond: (t1.c1 = t2.c1)
3803 SET enable_indexscan TO off;
3804 SET enable_mergejoin TO off;
3805 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3807 ------------------------------
3809 Hash Cond: (t1.c1 = t2.c1)
3815 SELECT name, setting FROM settings;
3817 ---------------------------+-----------
3820 geqo_generations | 0
3823 geqo_selection_bias | 2
3825 constraint_exclusion | partition
3826 cursor_tuple_fraction | 0.1
3827 default_statistics_target | 100
3828 from_collapse_limit | 8
3829 join_collapse_limit | 8
3830 cpu_index_tuple_cost | 0.005
3831 cpu_operator_cost | 0.0025
3832 cpu_tuple_cost | 0.01
3833 effective_cache_size | 16384
3834 random_page_cost | 4
3836 enable_bitmapscan | on
3838 enable_hashjoin | on
3839 enable_indexscan | off
3840 enable_material | on
3841 enable_mergejoin | off
3842 enable_nestloop | on
3846 client_min_messages | log
3849 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3850 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3856 Set(enable_indexscan on)
3857 Set(geqo_threshold 100)
3863 ------------------------------------
3865 Merge Cond: (t1.c1 = t2.c1)
3866 -> Index Scan using t1_i1 on t1
3867 -> Index Scan using t2_i1 on t2
3871 LOAD 'pg_hint_plan';
3872 SELECT name, setting FROM settings;
3874 ---------------------------+-----------
3877 geqo_generations | 0
3880 geqo_selection_bias | 2
3882 constraint_exclusion | partition
3883 cursor_tuple_fraction | 0.1
3884 default_statistics_target | 100
3885 from_collapse_limit | 8
3886 join_collapse_limit | 8
3887 cpu_index_tuple_cost | 0.005
3888 cpu_operator_cost | 0.0025
3889 cpu_tuple_cost | 0.01
3890 effective_cache_size | 16384
3891 random_page_cost | 4
3893 enable_bitmapscan | on
3895 enable_hashjoin | on
3896 enable_indexscan | on
3897 enable_material | on
3898 enable_mergejoin | on
3899 enable_nestloop | on
3903 client_min_messages | notice
3906 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3908 ------------------------------------
3910 Merge Cond: (t1.c1 = t2.c1)
3911 -> Index Scan using t1_i1 on t1
3917 SET pg_hint_plan.enable TO on;
3918 SET pg_hint_plan.debug_print TO on;
3919 SET client_min_messages TO LOG;
3920 SET search_path TO public;