OSDN Git Service

試験項目作成中に修正した以下のバグを元に戻した。
[pghintplan/pg_hint_plan.git] / expected / pg_hint_plan.out
1 SET search_path TO public;
2 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
3               QUERY PLAN              
4 --------------------------------------
5  Merge Join
6    Merge Cond: (t1.id = t2.id)
7    ->  Index Scan using t1_pkey on t1
8    ->  Index Scan using t2_pkey on t2
9 (4 rows)
10
11 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.val = t2.val;
12                 QUERY PLAN                 
13 -------------------------------------------
14  Merge Join
15    Merge Cond: (t2.val = t1.val)
16    ->  Index Scan using t2_val on t2
17    ->  Materialize
18          ->  Index Scan using t1_val on t1
19 (5 rows)
20
21 LOAD 'pg_hint_plan';
22 SET pg_hint_plan.debug_print TO on;
23 SET client_min_messages TO LOG;
24 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
25               QUERY PLAN              
26 --------------------------------------
27  Merge Join
28    Merge Cond: (t1.id = t2.id)
29    ->  Index Scan using t1_pkey on t1
30    ->  Index Scan using t2_pkey on t2
31 (4 rows)
32
33 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.val = t2.val;
34                 QUERY PLAN                 
35 -------------------------------------------
36  Merge Join
37    Merge Cond: (t2.val = t1.val)
38    ->  Index Scan using t2_val on t2
39    ->  Materialize
40          ->  Index Scan using t1_val on t1
41 (5 rows)
42
43 /*+ Test (t1 t2) */
44 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
45 INFO:  hint syntax error at or near "Test (t1 t2) "
46 DETAIL:  Keyword "Test" does not exist.
47               QUERY PLAN              
48 --------------------------------------
49  Merge Join
50    Merge Cond: (t1.id = t2.id)
51    ->  Index Scan using t1_pkey on t1
52    ->  Index Scan using t2_pkey on t2
53 (4 rows)
54
55 SET pg_hint_plan.enable TO off;
56 /*+ Test (t1 t2) */
57 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
58               QUERY PLAN              
59 --------------------------------------
60  Merge Join
61    Merge Cond: (t1.id = t2.id)
62    ->  Index Scan using t1_pkey on t1
63    ->  Index Scan using t2_pkey on t2
64 (4 rows)
65
66 SET pg_hint_plan.enable TO on;
67 /*+Set(enable_indexscan off)*/
68 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
69 LOG:  pg_hint_plan:
70 used hint:
71 Set(enable_indexscan off)
72 not used hint:
73 duplication hint:
74 error hint:
75
76           QUERY PLAN          
77 ------------------------------
78  Hash Join
79    Hash Cond: (t1.id = t2.id)
80    ->  Seq Scan on t1
81    ->  Hash
82          ->  Seq Scan on t2
83 (5 rows)
84
85 /*+ Set(enable_indexscan off) Set(enable_hashjoin off) */
86 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
87 LOG:  pg_hint_plan:
88 used hint:
89 Set(enable_hashjoin off)
90 Set(enable_indexscan off)
91 not used hint:
92 duplication hint:
93 error hint:
94
95           QUERY PLAN           
96 -------------------------------
97  Merge Join
98    Merge Cond: (t1.id = t2.id)
99    ->  Sort
100          Sort Key: t1.id
101          ->  Seq Scan on t1
102    ->  Sort
103          Sort Key: t2.id
104          ->  Seq Scan on t2
105 (8 rows)
106
107 /*+      Set     (       enable_indexscan        off     )       */
108 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
109 LOG:  pg_hint_plan:
110 used hint:
111 Set(enable_indexscan off)
112 not used hint:
113 duplication hint:
114 error hint:
115
116           QUERY PLAN          
117 ------------------------------
118  Hash Join
119    Hash Cond: (t1.id = t2.id)
120    ->  Seq Scan on t1
121    ->  Hash
122          ->  Seq Scan on t2
123 (5 rows)
124
125 /*+      
126                 Set      
127                 (        
128                 enable_indexscan         
129                 off      
130                 )        
131                 */              
132 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
133 LOG:  pg_hint_plan:
134 used hint:
135 Set(enable_indexscan off)
136 not used hint:
137 duplication hint:
138 error hint:
139
140           QUERY PLAN          
141 ------------------------------
142  Hash Join
143    Hash Cond: (t1.id = t2.id)
144    ->  Seq Scan on t1
145    ->  Hash
146          ->  Seq Scan on t2
147 (5 rows)
148
149 /*+ Set(enable_indexscan off)Set(enable_nestloop off)Set(enable_mergejoin off)          
150                 Set(enable_seqscan off)
151                 */
152 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
153 LOG:  pg_hint_plan:
154 used hint:
155 Set(enable_indexscan off)
156 Set(enable_mergejoin off)
157 Set(enable_nestloop off)
158 Set(enable_seqscan off)
159 not used hint:
160 duplication hint:
161 error hint:
162
163                  QUERY PLAN                 
164 --------------------------------------------
165  Hash Join
166    Hash Cond: (t1.id = t2.id)
167    ->  Index Scan using t1_pkey on t1
168    ->  Hash
169          ->  Index Scan using t2_pkey on t2
170 (5 rows)
171
172 /*+Set(work_mem "1M")*/
173 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
174 INFO:  invalid value for parameter "work_mem": "1M"
175 HINT:  Valid units for this parameter are "kB", "MB", and "GB".
176 LOG:  pg_hint_plan:
177 used hint:
178 not used hint:
179 duplication hint:
180 error hint:
181 Set(work_mem 1M)
182
183               QUERY PLAN              
184 --------------------------------------
185  Merge Join
186    Merge Cond: (t1.id = t2.id)
187    ->  Index Scan using t1_pkey on t1
188    ->  Index Scan using t2_pkey on t2
189 (4 rows)
190
191 /*+Set(work_mem "1MB")*/
192 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
193 LOG:  pg_hint_plan:
194 used hint:
195 Set(work_mem 1MB)
196 not used hint:
197 duplication hint:
198 error hint:
199
200               QUERY PLAN              
201 --------------------------------------
202  Merge Join
203    Merge Cond: (t1.id = t2.id)
204    ->  Index Scan using t1_pkey on t1
205    ->  Index Scan using t2_pkey on t2
206 (4 rows)
207
208 /*+Set(work_mem TO "1MB")*/
209 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
210 INFO:  hint syntax error at or near ""1MB")"
211 DETAIL:  Closed parenthesis is necessary.
212               QUERY PLAN              
213 --------------------------------------
214  Merge Join
215    Merge Cond: (t1.id = t2.id)
216    ->  Index Scan using t1_pkey on t1
217    ->  Index Scan using t2_pkey on t2
218 (4 rows)
219
220 /*+SeqScan(t1 t2)*/
221 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
222 INFO:  hint syntax error at or near "t2)"
223 DETAIL:  Closed parenthesis is necessary.
224               QUERY PLAN              
225 --------------------------------------
226  Merge Join
227    Merge Cond: (t1.id = t2.id)
228    ->  Index Scan using t1_pkey on t1
229    ->  Index Scan using t2_pkey on t2
230 (4 rows)
231
232 /*+SeqScan(t1)*/
233 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
234 LOG:  pg_hint_plan:
235 used hint:
236 SeqScan(t1)
237 not used hint:
238 duplication hint:
239 error hint:
240
241           QUERY PLAN          
242 ------------------------------
243  Hash Join
244    Hash Cond: (t1.id = t2.id)
245    ->  Seq Scan on t1
246    ->  Hash
247          ->  Seq Scan on t2
248 (5 rows)
249
250 /*+SeqScan(t1)IndexScan(t2)*/
251 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
252 LOG:  pg_hint_plan:
253 used hint:
254 SeqScan(t1)
255 IndexScan(t2)
256 not used hint:
257 duplication hint:
258 error hint:
259
260                  QUERY PLAN                 
261 --------------------------------------------
262  Hash Join
263    Hash Cond: (t1.id = t2.id)
264    ->  Seq Scan on t1
265    ->  Hash
266          ->  Index Scan using t2_pkey on t2
267 (5 rows)
268
269 /*+BitmapScan(t2)*/
270 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
271 LOG:  pg_hint_plan:
272 used hint:
273 BitmapScan(t2)
274 not used hint:
275 duplication hint:
276 error hint:
277
278                 QUERY PLAN                
279 ------------------------------------------
280  Nested Loop
281    ->  Seq Scan on t1
282    ->  Bitmap Heap Scan on t2
283          Recheck Cond: (id = t1.id)
284          ->  Bitmap Index Scan on t2_pkey
285                Index Cond: (id = t1.id)
286 (6 rows)
287
288 /*+BitmapScan(t2)NoSeqScan(t1)*/
289 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
290 LOG:  pg_hint_plan:
291 used hint:
292 NoSeqScan(t1)
293 BitmapScan(t2)
294 not used hint:
295 duplication hint:
296 error hint:
297
298                 QUERY PLAN                
299 ------------------------------------------
300  Nested Loop
301    ->  Index Scan using t1_pkey on t1
302    ->  Bitmap Heap Scan on t2
303          Recheck Cond: (id = t1.id)
304          ->  Bitmap Index Scan on t2_pkey
305                Index Cond: (id = t1.id)
306 (6 rows)
307
308 /*+NoIndexScan(t1)*/
309 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
310 LOG:  pg_hint_plan:
311 used hint:
312 NoIndexScan(t1)
313 not used hint:
314 duplication hint:
315 error hint:
316
317           QUERY PLAN          
318 ------------------------------
319  Hash Join
320    Hash Cond: (t1.id = t2.id)
321    ->  Seq Scan on t1
322    ->  Hash
323          ->  Seq Scan on t2
324 (5 rows)
325
326 /*+NoBitmapScan(t1)*/
327 EXPLAIN (COSTS false) SELECT * FROM t1, t4 WHERE t1.val < 10;
328 LOG:  pg_hint_plan:
329 used hint:
330 NoBitmapScan(t1)
331 not used hint:
332 duplication hint:
333 error hint:
334
335          QUERY PLAN         
336 ----------------------------
337  Nested Loop
338    ->  Seq Scan on t1
339          Filter: (val < 10)
340    ->  Materialize
341          ->  Seq Scan on t4
342 (5 rows)
343
344 /*+TidScan(t4)*/
345 EXPLAIN (COSTS false) SELECT * FROM t3, t4 WHERE t3.id = t4.id AND t4.ctid = '(1,1)';
346 LOG:  pg_hint_plan:
347 used hint:
348 TidScan(t4)
349 not used hint:
350 duplication hint:
351 error hint:
352
353                   QUERY PLAN                   
354 -----------------------------------------------
355  Merge Join
356    Merge Cond: (t3.id = t4.id)
357    ->  Index Scan using t3_pkey on t3
358    ->  Sort
359          Sort Key: t4.id
360          ->  Tid Scan on t4
361                TID Cond: (ctid = '(1,1)'::tid)
362 (7 rows)
363
364 /*+NoTidScan(t1)*/
365 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)';
366 LOG:  pg_hint_plan:
367 used hint:
368 NoTidScan(t1)
369 not used hint:
370 duplication hint:
371 error hint:
372
373               QUERY PLAN               
374 ---------------------------------------
375  Nested Loop
376    ->  Seq Scan on t1
377          Filter: (ctid = '(1,1)'::tid)
378    ->  Index Scan using t2_pkey on t2
379          Index Cond: (id = t1.id)
380 (5 rows)
381
382 /*+HashJoin(t1 t2)*/
383 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
384 LOG:  pg_hint_plan:
385 used hint:
386 HashJoin(t1 t2)
387 not used hint:
388 duplication hint:
389 error hint:
390
391           QUERY PLAN          
392 ------------------------------
393  Hash Join
394    Hash Cond: (t1.id = t2.id)
395    ->  Seq Scan on t1
396    ->  Hash
397          ->  Seq Scan on t2
398 (5 rows)
399
400 /*+NestLoop(t1 t2)*/
401 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
402 LOG:  pg_hint_plan:
403 used hint:
404 NestLoop(t1 t2)
405 not used hint:
406 duplication hint:
407 error hint:
408
409               QUERY PLAN              
410 --------------------------------------
411  Nested Loop
412    ->  Seq Scan on t2
413    ->  Index Scan using t1_pkey on t1
414          Index Cond: (id = t2.id)
415 (4 rows)
416
417 /*+NoMergeJoin(t1 t2)*/
418 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
419 LOG:  pg_hint_plan:
420 used hint:
421 NoMergeJoin(t1 t2)
422 not used hint:
423 duplication hint:
424 error hint:
425
426           QUERY PLAN          
427 ------------------------------
428  Hash Join
429    Hash Cond: (t1.id = t2.id)
430    ->  Seq Scan on t1
431    ->  Hash
432          ->  Seq Scan on t2
433 (5 rows)
434
435 /*+MergeJoin(t1 t3)*/
436 EXPLAIN (COSTS false) SELECT * FROM t1, t3 WHERE t1.val = t3.val;
437 LOG:  pg_hint_plan:
438 used hint:
439 MergeJoin(t1 t3)
440 not used hint:
441 duplication hint:
442 error hint:
443
444              QUERY PLAN              
445 -------------------------------------
446  Merge Join
447    Merge Cond: (t1.val = t3.val)
448    ->  Index Scan using t1_val on t1
449    ->  Sort
450          Sort Key: t3.val
451          ->  Seq Scan on t3
452 (6 rows)
453
454 /*+NestLoop(t1 t3)*/
455 EXPLAIN (COSTS false) SELECT * FROM t1, t3 WHERE t1.val = t3.val;
456 LOG:  pg_hint_plan:
457 used hint:
458 NestLoop(t1 t3)
459 not used hint:
460 duplication hint:
461 error hint:
462
463              QUERY PLAN              
464 -------------------------------------
465  Nested Loop
466    ->  Seq Scan on t3
467    ->  Index Scan using t1_val on t1
468          Index Cond: (val = t3.val)
469 (4 rows)
470
471 /*+NoHashJoin(t1 t3)*/
472 EXPLAIN (COSTS false) SELECT * FROM t1, t3 WHERE t1.val = t3.val;
473 LOG:  pg_hint_plan:
474 used hint:
475 NoHashJoin(t1 t3)
476 not used hint:
477 duplication hint:
478 error hint:
479
480              QUERY PLAN              
481 -------------------------------------
482  Nested Loop
483    ->  Seq Scan on t3
484    ->  Index Scan using t1_val on t1
485          Index Cond: (val = t3.val)
486 (4 rows)
487
488 /*+MergeJoin(t4 t1 t2 t3)*/
489 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
490 LOG:  pg_hint_plan:
491 used hint:
492 MergeJoin(t1 t2 t3 t4)
493 not used hint:
494 duplication hint:
495 error hint:
496
497                     QUERY PLAN                    
498 --------------------------------------------------
499  Merge Join
500    Merge Cond: (t1.id = t4.id)
501    ->  Merge Join
502          Merge Cond: (t1.id = t3.id)
503          ->  Merge Join
504                Merge Cond: (t1.id = t2.id)
505                ->  Index Scan using t1_pkey on t1
506                ->  Index Scan using t2_pkey on t2
507          ->  Index Scan using t3_pkey on t3
508    ->  Sort
509          Sort Key: t4.id
510          ->  Seq Scan on t4
511 (12 rows)
512
513 /*+HashJoin(t3 t4 t1 t2)*/
514 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
515 LOG:  pg_hint_plan:
516 used hint:
517 HashJoin(t1 t2 t3 t4)
518 not used hint:
519 duplication hint:
520 error hint:
521
522                        QUERY PLAN                       
523 --------------------------------------------------------
524  Hash Join
525    Hash Cond: (t3.id = t1.id)
526    ->  Seq Scan on t3
527    ->  Hash
528          ->  Merge Join
529                Merge Cond: (t1.id = t4.id)
530                ->  Merge Join
531                      Merge Cond: (t1.id = t2.id)
532                      ->  Index Scan using t1_pkey on t1
533                      ->  Index Scan using t2_pkey on t2
534                ->  Sort
535                      Sort Key: t4.id
536                      ->  Seq Scan on t4
537 (13 rows)
538
539 /*+NestLoop(t2 t3 t4 t1) IndexScan(t3)*/
540 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
541 LOG:  pg_hint_plan:
542 used hint:
543 IndexScan(t3)
544 NestLoop(t1 t2 t3 t4)
545 not used hint:
546 duplication hint:
547 error hint:
548
549                     QUERY PLAN                    
550 --------------------------------------------------
551  Nested Loop
552    ->  Merge Join
553          Merge Cond: (t1.id = t4.id)
554          ->  Merge Join
555                Merge Cond: (t1.id = t2.id)
556                ->  Index Scan using t1_pkey on t1
557                ->  Index Scan using t2_pkey on t2
558          ->  Sort
559                Sort Key: t4.id
560                ->  Seq Scan on t4
561    ->  Index Scan using t3_pkey on t3
562          Index Cond: (id = t1.id)
563 (12 rows)
564
565 /*+NoNestLoop(t4 t1 t3 t2)*/
566 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
567 LOG:  pg_hint_plan:
568 used hint:
569 NoNestLoop(t1 t2 t3 t4)
570 not used hint:
571 duplication hint:
572 error hint:
573
574                     QUERY PLAN                    
575 --------------------------------------------------
576  Merge Join
577    Merge Cond: (t1.id = t4.id)
578    ->  Merge Join
579          Merge Cond: (t1.id = t3.id)
580          ->  Merge Join
581                Merge Cond: (t1.id = t2.id)
582                ->  Index Scan using t1_pkey on t1
583                ->  Index Scan using t2_pkey on t2
584          ->  Index Scan using t3_pkey on t3
585    ->  Sort
586          Sort Key: t4.id
587          ->  Seq Scan on t4
588 (12 rows)
589
590 /*+Leading( */
591 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
592 INFO:  hint syntax error at or near ""
593 DETAIL:  relation name is necessary.
594                     QUERY PLAN                    
595 --------------------------------------------------
596  Merge Join
597    Merge Cond: (t1.id = t4.id)
598    ->  Merge Join
599          Merge Cond: (t1.id = t3.id)
600          ->  Merge Join
601                Merge Cond: (t1.id = t2.id)
602                ->  Index Scan using t1_pkey on t1
603                ->  Index Scan using t2_pkey on t2
604          ->  Index Scan using t3_pkey on t3
605    ->  Sort
606          Sort Key: t4.id
607          ->  Seq Scan on t4
608 (12 rows)
609
610 /*+Leading( )*/
611 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
612 INFO:  hint syntax error at or near "Leading( )"
613 DETAIL:  In Leading hint, specified relation name 2 or more.
614 LOG:  pg_hint_plan:
615 used hint:
616 not used hint:
617 duplication hint:
618 error hint:
619 Leading()
620
621                     QUERY PLAN                    
622 --------------------------------------------------
623  Merge Join
624    Merge Cond: (t1.id = t4.id)
625    ->  Merge Join
626          Merge Cond: (t1.id = t3.id)
627          ->  Merge Join
628                Merge Cond: (t1.id = t2.id)
629                ->  Index Scan using t1_pkey on t1
630                ->  Index Scan using t2_pkey on t2
631          ->  Index Scan using t3_pkey on t3
632    ->  Sort
633          Sort Key: t4.id
634          ->  Seq Scan on t4
635 (12 rows)
636
637 /*+Leading( t3 )*/
638 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
639 INFO:  hint syntax error at or near "Leading( t3 )"
640 DETAIL:  In Leading hint, specified relation name 2 or more.
641 LOG:  pg_hint_plan:
642 used hint:
643 not used hint:
644 duplication hint:
645 error hint:
646 Leading(t3)
647
648                     QUERY PLAN                    
649 --------------------------------------------------
650  Merge Join
651    Merge Cond: (t1.id = t4.id)
652    ->  Merge Join
653          Merge Cond: (t1.id = t3.id)
654          ->  Merge Join
655                Merge Cond: (t1.id = t2.id)
656                ->  Index Scan using t1_pkey on t1
657                ->  Index Scan using t2_pkey on t2
658          ->  Index Scan using t3_pkey on t3
659    ->  Sort
660          Sort Key: t4.id
661          ->  Seq Scan on t4
662 (12 rows)
663
664 /*+Leading( t3 t4 )*/
665 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
666 LOG:  pg_hint_plan:
667 used hint:
668 Leading(t3 t4)
669 not used hint:
670 duplication hint:
671 error hint:
672
673                     QUERY PLAN                    
674 --------------------------------------------------
675  Nested Loop
676    ->  Nested Loop
677          ->  Merge Join
678                Merge Cond: (t3.id = t4.id)
679                ->  Index Scan using t3_pkey on t3
680                ->  Sort
681                      Sort Key: t4.id
682                      ->  Seq Scan on t4
683          ->  Index Scan using t2_pkey on t2
684                Index Cond: (id = t3.id)
685    ->  Index Scan using t1_pkey on t1
686          Index Cond: (id = t2.id)
687 (12 rows)
688
689 /*+Leading(t3 t4 t1)*/
690 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
691 LOG:  pg_hint_plan:
692 used hint:
693 Leading(t3 t4 t1)
694 not used hint:
695 duplication hint:
696 error hint:
697
698                     QUERY PLAN                    
699 --------------------------------------------------
700  Nested Loop
701    ->  Merge Join
702          Merge Cond: (t3.id = t1.id)
703          ->  Merge Join
704                Merge Cond: (t3.id = t4.id)
705                ->  Index Scan using t3_pkey on t3
706                ->  Sort
707                      Sort Key: t4.id
708                      ->  Seq Scan on t4
709          ->  Index Scan using t1_pkey on t1
710    ->  Index Scan using t2_pkey on t2
711          Index Cond: (id = t1.id)
712 (12 rows)
713
714 /*+Leading(t3 t4 t1 t2)*/
715 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
716 LOG:  pg_hint_plan:
717 used hint:
718 Leading(t3 t4 t1 t2)
719 not used hint:
720 duplication hint:
721 error hint:
722
723                     QUERY PLAN                    
724 --------------------------------------------------
725  Nested Loop
726    ->  Merge Join
727          Merge Cond: (t3.id = t1.id)
728          ->  Merge Join
729                Merge Cond: (t3.id = t4.id)
730                ->  Index Scan using t3_pkey on t3
731                ->  Sort
732                      Sort Key: t4.id
733                      ->  Seq Scan on t4
734          ->  Index Scan using t1_pkey on t1
735    ->  Index Scan using t2_pkey on t2
736          Index Cond: (id = t1.id)
737 (12 rows)
738
739 /*+Leading(t3 t4 t1 t2 t1)*/
740 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
741 LOG:  pg_hint_plan:
742 used hint:
743 Leading(t3 t4 t1 t2 t1)
744 not used hint:
745 duplication hint:
746 error hint:
747
748                     QUERY PLAN                    
749 --------------------------------------------------
750  Nested Loop
751    ->  Merge Join
752          Merge Cond: (t3.id = t1.id)
753          ->  Merge Join
754                Merge Cond: (t3.id = t4.id)
755                ->  Index Scan using t3_pkey on t3
756                ->  Sort
757                      Sort Key: t4.id
758                      ->  Seq Scan on t4
759          ->  Index Scan using t1_pkey on t1
760    ->  Index Scan using t2_pkey on t2
761          Index Cond: (id = t1.id)
762 (12 rows)
763
764 /*+Leading(t3 t4 t4)*/
765 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
766 INFO:  hint syntax error at or near "Leading(t3 t4 t4)"
767 DETAIL:  Relation name "t4" is duplicate.
768 LOG:  pg_hint_plan:
769 used hint:
770 not used hint:
771 duplication hint:
772 error hint:
773 Leading(t3 t4 t4)
774
775                     QUERY PLAN                    
776 --------------------------------------------------
777  Merge Join
778    Merge Cond: (t1.id = t4.id)
779    ->  Merge Join
780          Merge Cond: (t1.id = t3.id)
781          ->  Merge Join
782                Merge Cond: (t1.id = t2.id)
783                ->  Index Scan using t1_pkey on t1
784                ->  Index Scan using t2_pkey on t2
785          ->  Index Scan using t3_pkey on t3
786    ->  Sort
787          Sort Key: t4.id
788          ->  Seq Scan on t4
789 (12 rows)
790
791 EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
792                   QUERY PLAN                   
793 -----------------------------------------------
794  Nested Loop
795    ->  Values Scan on "*VALUES*"
796    ->  Index Scan using t1_pkey on t1
797          Index Cond: (id = "*VALUES*".column1)
798 (4 rows)
799
800 /*+HashJoin(t1 t2)*/
801 EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
802 LOG:  pg_hint_plan:
803 used hint:
804 not used hint:
805 HashJoin(t1 t2)
806 duplication hint:
807 error hint:
808
809                   QUERY PLAN                   
810 -----------------------------------------------
811  Nested Loop
812    ->  Values Scan on "*VALUES*"
813    ->  Index Scan using t1_pkey on t1
814          Index Cond: (id = "*VALUES*".column1)
815 (4 rows)
816
817 /*+HashJoin(t1 *VALUES*)*/
818 EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
819 LOG:  pg_hint_plan:
820 used hint:
821 HashJoin(*VALUES* t1)
822 not used hint:
823 duplication hint:
824 error hint:
825
826                 QUERY PLAN                 
827 -------------------------------------------
828  Hash Join
829    Hash Cond: (t1.id = "*VALUES*".column1)
830    ->  Seq Scan on t1
831    ->  Hash
832          ->  Values Scan on "*VALUES*"
833 (5 rows)
834
835 /*+HashJoin(t1 *VALUES*) IndexScan(t1) IndexScan(*VALUES*)*/
836 EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
837 LOG:  pg_hint_plan:
838 used hint:
839 IndexScan(t1)
840 HashJoin(*VALUES* t1)
841 not used hint:
842 IndexScan(*VALUES*)
843 duplication hint:
844 error hint:
845
846                 QUERY PLAN                 
847 -------------------------------------------
848  Hash Join
849    Hash Cond: (t1.id = "*VALUES*".column1)
850    ->  Index Scan using t1_pkey on t1
851    ->  Hash
852          ->  Values Scan on "*VALUES*"
853 (5 rows)
854
855 -- single table scan hint test
856 EXPLAIN SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
857                                              QUERY PLAN                                              
858 -----------------------------------------------------------------------------------------------------
859  Index Scan using t1_pkey on t1  (cost=1.89..10.16 rows=1 width=4)
860    Index Cond: (id = $3)
861    InitPlan 2 (returns $1)
862      ->  Result  (cost=0.94..0.95 rows=1 width=0)
863            InitPlan 1 (returns $0)
864              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
865                    ->  Index Scan Backward using t1_pkey on t1 v_1  (cost=0.00..8.43 rows=9 width=4)
866                          Index Cond: ((id IS NOT NULL) AND (id < 10))
867    InitPlan 4 (returns $3)
868      ->  Result  (cost=0.94..0.95 rows=1 width=0)
869            InitPlan 3 (returns $2)
870              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
871                    ->  Index Scan Backward using t1_pkey on t1 v_2  (cost=0.00..8.43 rows=9 width=4)
872                          Index Cond: ((id IS NOT NULL) AND (id < 10))
873 (14 rows)
874
875 /*+BitmapScan(v_1)*/
876 EXPLAIN SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
877 LOG:  pg_hint_plan:
878 used hint:
879 BitmapScan(v_1)
880 not used hint:
881 duplication hint:
882 error hint:
883
884                                              QUERY PLAN                                              
885 -----------------------------------------------------------------------------------------------------
886  Index Scan using t1_pkey on t1  (cost=29.34..37.61 rows=1 width=4)
887    Index Cond: (id = $2)
888    InitPlan 1 (returns $0)
889      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
890            ->  Bitmap Heap Scan on t1 v_1  (cost=4.32..28.36 rows=9 width=4)
891                  Recheck Cond: (id < 10)
892                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
893                        Index Cond: (id < 10)
894    InitPlan 3 (returns $2)
895      ->  Result  (cost=0.94..0.95 rows=1 width=0)
896            InitPlan 2 (returns $1)
897              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
898                    ->  Index Scan Backward using t1_pkey on t1 v_2  (cost=0.00..8.43 rows=9 width=4)
899                          Index Cond: ((id IS NOT NULL) AND (id < 10))
900 (14 rows)
901
902 /*+BitmapScan(v_2)*/
903 EXPLAIN SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
904 LOG:  pg_hint_plan:
905 used hint:
906 BitmapScan(v_2)
907 not used hint:
908 duplication hint:
909 error hint:
910
911                                              QUERY PLAN                                              
912 -----------------------------------------------------------------------------------------------------
913  Index Scan using t1_pkey on t1  (cost=29.34..37.61 rows=1 width=4)
914    Index Cond: (id = $2)
915    InitPlan 2 (returns $1)
916      ->  Result  (cost=0.94..0.95 rows=1 width=0)
917            InitPlan 1 (returns $0)
918              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
919                    ->  Index Scan Backward using t1_pkey on t1 v_1  (cost=0.00..8.43 rows=9 width=4)
920                          Index Cond: ((id IS NOT NULL) AND (id < 10))
921    InitPlan 3 (returns $2)
922      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
923            ->  Bitmap Heap Scan on t1 v_2  (cost=4.32..28.36 rows=9 width=4)
924                  Recheck Cond: (id < 10)
925                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
926                        Index Cond: (id < 10)
927 (14 rows)
928
929 /*+BitmapScan(t1)*/
930 EXPLAIN SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
931 LOG:  pg_hint_plan:
932 used hint:
933 BitmapScan(t1)
934 not used hint:
935 duplication hint:
936 error hint:
937
938                                              QUERY PLAN                                              
939 -----------------------------------------------------------------------------------------------------
940  Bitmap Heap Scan on t1  (cost=6.15..10.17 rows=1 width=4)
941    Recheck Cond: (id = $3)
942    InitPlan 2 (returns $1)
943      ->  Result  (cost=0.94..0.95 rows=1 width=0)
944            InitPlan 1 (returns $0)
945              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
946                    ->  Index Scan Backward using t1_pkey on t1 v_1  (cost=0.00..8.43 rows=9 width=4)
947                          Index Cond: ((id IS NOT NULL) AND (id < 10))
948    InitPlan 4 (returns $3)
949      ->  Result  (cost=0.94..0.95 rows=1 width=0)
950            InitPlan 3 (returns $2)
951              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
952                    ->  Index Scan Backward using t1_pkey on t1 v_2  (cost=0.00..8.43 rows=9 width=4)
953                          Index Cond: ((id IS NOT NULL) AND (id < 10))
954    ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.26 rows=1 width=0)
955          Index Cond: (id = $3)
956 (16 rows)
957
958 /*+BitmapScan(v_1)BitmapScan(v_2)*/
959 EXPLAIN SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
960 LOG:  pg_hint_plan:
961 used hint:
962 BitmapScan(v_1)
963 BitmapScan(v_2)
964 not used hint:
965 duplication hint:
966 error hint:
967
968                                      QUERY PLAN                                     
969 ------------------------------------------------------------------------------------
970  Index Scan using t1_pkey on t1  (cost=56.78..65.05 rows=1 width=4)
971    Index Cond: (id = $1)
972    InitPlan 1 (returns $0)
973      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
974            ->  Bitmap Heap Scan on t1 v_1  (cost=4.32..28.36 rows=9 width=4)
975                  Recheck Cond: (id < 10)
976                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
977                        Index Cond: (id < 10)
978    InitPlan 2 (returns $1)
979      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
980            ->  Bitmap Heap Scan on t1 v_2  (cost=4.32..28.36 rows=9 width=4)
981                  Recheck Cond: (id < 10)
982                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
983                        Index Cond: (id < 10)
984 (14 rows)
985
986 /*+BitmapScan(v_1)BitmapScan(t1)*/
987 EXPLAIN SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
988 LOG:  pg_hint_plan:
989 used hint:
990 BitmapScan(t1)
991 BitmapScan(v_1)
992 not used hint:
993 duplication hint:
994 error hint:
995
996                                              QUERY PLAN                                              
997 -----------------------------------------------------------------------------------------------------
998  Bitmap Heap Scan on t1  (cost=33.60..37.61 rows=1 width=4)
999    Recheck Cond: (id = $2)
1000    InitPlan 1 (returns $0)
1001      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
1002            ->  Bitmap Heap Scan on t1 v_1  (cost=4.32..28.36 rows=9 width=4)
1003                  Recheck Cond: (id < 10)
1004                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
1005                        Index Cond: (id < 10)
1006    InitPlan 3 (returns $2)
1007      ->  Result  (cost=0.94..0.95 rows=1 width=0)
1008            InitPlan 2 (returns $1)
1009              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
1010                    ->  Index Scan Backward using t1_pkey on t1 v_2  (cost=0.00..8.43 rows=9 width=4)
1011                          Index Cond: ((id IS NOT NULL) AND (id < 10))
1012    ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.26 rows=1 width=0)
1013          Index Cond: (id = $2)
1014 (16 rows)
1015
1016 /*+BitmapScan(v_2)BitmapScan(t1)*/
1017 EXPLAIN SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
1018 LOG:  pg_hint_plan:
1019 used hint:
1020 BitmapScan(t1)
1021 BitmapScan(v_2)
1022 not used hint:
1023 duplication hint:
1024 error hint:
1025
1026                                              QUERY PLAN                                              
1027 -----------------------------------------------------------------------------------------------------
1028  Bitmap Heap Scan on t1  (cost=33.60..37.61 rows=1 width=4)
1029    Recheck Cond: (id = $2)
1030    InitPlan 2 (returns $1)
1031      ->  Result  (cost=0.94..0.95 rows=1 width=0)
1032            InitPlan 1 (returns $0)
1033              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
1034                    ->  Index Scan Backward using t1_pkey on t1 v_1  (cost=0.00..8.43 rows=9 width=4)
1035                          Index Cond: ((id IS NOT NULL) AND (id < 10))
1036    InitPlan 3 (returns $2)
1037      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
1038            ->  Bitmap Heap Scan on t1 v_2  (cost=4.32..28.36 rows=9 width=4)
1039                  Recheck Cond: (id < 10)
1040                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
1041                        Index Cond: (id < 10)
1042    ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.26 rows=1 width=0)
1043          Index Cond: (id = $2)
1044 (16 rows)
1045
1046 /*+BitmapScan(v_1)BitmapScan(v_2)BitmapScan(t1)*/
1047 EXPLAIN SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
1048 LOG:  pg_hint_plan:
1049 used hint:
1050 BitmapScan(t1)
1051 BitmapScan(v_1)
1052 BitmapScan(v_2)
1053 not used hint:
1054 duplication hint:
1055 error hint:
1056
1057                                      QUERY PLAN                                     
1058 ------------------------------------------------------------------------------------
1059  Bitmap Heap Scan on t1  (cost=61.04..65.05 rows=1 width=4)
1060    Recheck Cond: (id = $1)
1061    InitPlan 1 (returns $0)
1062      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
1063            ->  Bitmap Heap Scan on t1 v_1  (cost=4.32..28.36 rows=9 width=4)
1064                  Recheck Cond: (id < 10)
1065                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
1066                        Index Cond: (id < 10)
1067    InitPlan 2 (returns $1)
1068      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
1069            ->  Bitmap Heap Scan on t1 v_2  (cost=4.32..28.36 rows=9 width=4)
1070                  Recheck Cond: (id < 10)
1071                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
1072                        Index Cond: (id < 10)
1073    ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.26 rows=1 width=0)
1074          Index Cond: (id = $1)
1075 (16 rows)
1076
1077 -- full scan hint pattern test
1078 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1079             QUERY PLAN             
1080 -----------------------------------
1081  Tid Scan on t1
1082    TID Cond: (ctid = '(1,1)'::tid)
1083    Filter: (id < 10)
1084 (3 rows)
1085
1086 /*+SeqScan(t1)*/
1087 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1088 LOG:  pg_hint_plan:
1089 used hint:
1090 SeqScan(t1)
1091 not used hint:
1092 duplication hint:
1093 error hint:
1094
1095                    QUERY PLAN                    
1096 -------------------------------------------------
1097  Seq Scan on t1
1098    Filter: ((id < 10) AND (ctid = '(1,1)'::tid))
1099 (2 rows)
1100
1101 /*+IndexScan(t1)*/
1102 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1103 LOG:  pg_hint_plan:
1104 used hint:
1105 IndexScan(t1)
1106 not used hint:
1107 duplication hint:
1108 error hint:
1109
1110            QUERY PLAN            
1111 ---------------------------------
1112  Index Scan using t1_pkey on t1
1113    Index Cond: (id < 10)
1114    Filter: (ctid = '(1,1)'::tid)
1115 (3 rows)
1116
1117 /*+BitmapScan(t1)*/
1118 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1119 LOG:  pg_hint_plan:
1120 used hint:
1121 BitmapScan(t1)
1122 not used hint:
1123 duplication hint:
1124 error hint:
1125
1126              QUERY PLAN             
1127 ------------------------------------
1128  Bitmap Heap Scan on t1
1129    Recheck Cond: (id < 10)
1130    Filter: (ctid = '(1,1)'::tid)
1131    ->  Bitmap Index Scan on t1_pkey
1132          Index Cond: (id < 10)
1133 (5 rows)
1134
1135 /*+TidScan(t1)*/
1136 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1137 LOG:  pg_hint_plan:
1138 used hint:
1139 TidScan(t1)
1140 not used hint:
1141 duplication hint:
1142 error hint:
1143
1144             QUERY PLAN             
1145 -----------------------------------
1146  Tid Scan on t1
1147    TID Cond: (ctid = '(1,1)'::tid)
1148    Filter: (id < 10)
1149 (3 rows)
1150
1151 /*+NoSeqScan(t1)*/
1152 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1153 LOG:  pg_hint_plan:
1154 used hint:
1155 NoSeqScan(t1)
1156 not used hint:
1157 duplication hint:
1158 error hint:
1159
1160             QUERY PLAN             
1161 -----------------------------------
1162  Tid Scan on t1
1163    TID Cond: (ctid = '(1,1)'::tid)
1164    Filter: (id < 10)
1165 (3 rows)
1166
1167 /*+NoIndexScan(t1)*/
1168 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1169 LOG:  pg_hint_plan:
1170 used hint:
1171 NoIndexScan(t1)
1172 not used hint:
1173 duplication hint:
1174 error hint:
1175
1176             QUERY PLAN             
1177 -----------------------------------
1178  Tid Scan on t1
1179    TID Cond: (ctid = '(1,1)'::tid)
1180    Filter: (id < 10)
1181 (3 rows)
1182
1183 /*+NoBitmapScan(t1)*/
1184 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1185 LOG:  pg_hint_plan:
1186 used hint:
1187 NoBitmapScan(t1)
1188 not used hint:
1189 duplication hint:
1190 error hint:
1191
1192             QUERY PLAN             
1193 -----------------------------------
1194  Tid Scan on t1
1195    TID Cond: (ctid = '(1,1)'::tid)
1196    Filter: (id < 10)
1197 (3 rows)
1198
1199 /*+NoTidScan(t1)*/
1200 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1201 LOG:  pg_hint_plan:
1202 used hint:
1203 NoTidScan(t1)
1204 not used hint:
1205 duplication hint:
1206 error hint:
1207
1208            QUERY PLAN            
1209 ---------------------------------
1210  Index Scan using t1_pkey on t1
1211    Index Cond: (id < 10)
1212    Filter: (ctid = '(1,1)'::tid)
1213 (3 rows)
1214
1215 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1216                QUERY PLAN                
1217 -----------------------------------------
1218  Nested Loop
1219    Join Filter: (t1.id = t2.id)
1220    ->  Tid Scan on t1
1221          TID Cond: (ctid = '(1,1)'::tid)
1222    ->  Tid Scan on t2
1223          TID Cond: (ctid = '(1,1)'::tid)
1224 (6 rows)
1225
1226 /*+SeqScan(t1)*/
1227 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1228 LOG:  pg_hint_plan:
1229 used hint:
1230 SeqScan(t1)
1231 not used hint:
1232 duplication hint:
1233 error hint:
1234
1235                QUERY PLAN                
1236 -----------------------------------------
1237  Nested Loop
1238    Join Filter: (t1.id = t2.id)
1239    ->  Seq Scan on t1
1240          Filter: (ctid = '(1,1)'::tid)
1241    ->  Tid Scan on t2
1242          TID Cond: (ctid = '(1,1)'::tid)
1243 (6 rows)
1244
1245 /*+SeqScan(t2)*/
1246 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1247 LOG:  pg_hint_plan:
1248 used hint:
1249 SeqScan(t2)
1250 not used hint:
1251 duplication hint:
1252 error hint:
1253
1254                QUERY PLAN                
1255 -----------------------------------------
1256  Nested Loop
1257    Join Filter: (t1.id = t2.id)
1258    ->  Tid Scan on t1
1259          TID Cond: (ctid = '(1,1)'::tid)
1260    ->  Seq Scan on t2
1261          Filter: (ctid = '(1,1)'::tid)
1262 (6 rows)
1263
1264 /*+SeqScan(t1) SeqScan(t2)*/
1265 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1266 LOG:  pg_hint_plan:
1267 used hint:
1268 SeqScan(t1)
1269 SeqScan(t2)
1270 not used hint:
1271 duplication hint:
1272 error hint:
1273
1274               QUERY PLAN               
1275 ---------------------------------------
1276  Nested Loop
1277    Join Filter: (t1.id = t2.id)
1278    ->  Seq Scan on t1
1279          Filter: (ctid = '(1,1)'::tid)
1280    ->  Seq Scan on t2
1281          Filter: (ctid = '(1,1)'::tid)
1282 (6 rows)
1283
1284 /*+SeqScan(t1) IndexScan(t2)*/
1285 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1286 LOG:  pg_hint_plan:
1287 used hint:
1288 SeqScan(t1)
1289 IndexScan(t2)
1290 not used hint:
1291 duplication hint:
1292 error hint:
1293
1294               QUERY PLAN               
1295 ---------------------------------------
1296  Nested Loop
1297    ->  Seq Scan on t1
1298          Filter: (ctid = '(1,1)'::tid)
1299    ->  Index Scan using t2_pkey on t2
1300          Index Cond: (id = t1.id)
1301          Filter: (ctid = '(1,1)'::tid)
1302 (6 rows)
1303
1304 /*+SeqScan(t1) BitmapScan(t2)*/
1305 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1306 LOG:  pg_hint_plan:
1307 used hint:
1308 SeqScan(t1)
1309 BitmapScan(t2)
1310 not used hint:
1311 duplication hint:
1312 error hint:
1313
1314                 QUERY PLAN                
1315 ------------------------------------------
1316  Nested Loop
1317    ->  Seq Scan on t1
1318          Filter: (ctid = '(1,1)'::tid)
1319    ->  Bitmap Heap Scan on t2
1320          Recheck Cond: (id = t1.id)
1321          Filter: (ctid = '(1,1)'::tid)
1322          ->  Bitmap Index Scan on t2_pkey
1323                Index Cond: (id = t1.id)
1324 (8 rows)
1325
1326 /*+SeqScan(t1) TidScan(t2)*/
1327 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1328 LOG:  pg_hint_plan:
1329 used hint:
1330 SeqScan(t1)
1331 TidScan(t2)
1332 not used hint:
1333 duplication hint:
1334 error hint:
1335
1336                QUERY PLAN                
1337 -----------------------------------------
1338  Nested Loop
1339    Join Filter: (t1.id = t2.id)
1340    ->  Seq Scan on t1
1341          Filter: (ctid = '(1,1)'::tid)
1342    ->  Tid Scan on t2
1343          TID Cond: (ctid = '(1,1)'::tid)
1344 (6 rows)
1345
1346 /*+SeqScan(t1) NoSeqScan(t2)*/
1347 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1348 LOG:  pg_hint_plan:
1349 used hint:
1350 SeqScan(t1)
1351 NoSeqScan(t2)
1352 not used hint:
1353 duplication hint:
1354 error hint:
1355
1356                QUERY PLAN                
1357 -----------------------------------------
1358  Nested Loop
1359    Join Filter: (t1.id = t2.id)
1360    ->  Seq Scan on t1
1361          Filter: (ctid = '(1,1)'::tid)
1362    ->  Tid Scan on t2
1363          TID Cond: (ctid = '(1,1)'::tid)
1364 (6 rows)
1365
1366 /*+SeqScan(t1) NoIndexScan(t2)*/
1367 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1368 LOG:  pg_hint_plan:
1369 used hint:
1370 SeqScan(t1)
1371 NoIndexScan(t2)
1372 not used hint:
1373 duplication hint:
1374 error hint:
1375
1376                QUERY PLAN                
1377 -----------------------------------------
1378  Nested Loop
1379    Join Filter: (t1.id = t2.id)
1380    ->  Seq Scan on t1
1381          Filter: (ctid = '(1,1)'::tid)
1382    ->  Tid Scan on t2
1383          TID Cond: (ctid = '(1,1)'::tid)
1384 (6 rows)
1385
1386 /*+SeqScan(t1) NoBitmapScan(t2)*/
1387 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1388 LOG:  pg_hint_plan:
1389 used hint:
1390 SeqScan(t1)
1391 NoBitmapScan(t2)
1392 not used hint:
1393 duplication hint:
1394 error hint:
1395
1396                QUERY PLAN                
1397 -----------------------------------------
1398  Nested Loop
1399    Join Filter: (t1.id = t2.id)
1400    ->  Seq Scan on t1
1401          Filter: (ctid = '(1,1)'::tid)
1402    ->  Tid Scan on t2
1403          TID Cond: (ctid = '(1,1)'::tid)
1404 (6 rows)
1405
1406 /*+SeqScan(t1) NoTidScan(t2)*/
1407 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1408 LOG:  pg_hint_plan:
1409 used hint:
1410 SeqScan(t1)
1411 NoTidScan(t2)
1412 not used hint:
1413 duplication hint:
1414 error hint:
1415
1416               QUERY PLAN               
1417 ---------------------------------------
1418  Nested Loop
1419    ->  Seq Scan on t1
1420          Filter: (ctid = '(1,1)'::tid)
1421    ->  Index Scan using t2_pkey on t2
1422          Index Cond: (id = t1.id)
1423          Filter: (ctid = '(1,1)'::tid)
1424 (6 rows)
1425
1426 /*+IndexScan(t1)*/
1427 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1428 LOG:  pg_hint_plan:
1429 used hint:
1430 IndexScan(t1)
1431 not used hint:
1432 duplication hint:
1433 error hint:
1434
1435                QUERY PLAN                
1436 -----------------------------------------
1437  Nested Loop
1438    ->  Tid Scan on t2
1439          TID Cond: (ctid = '(1,1)'::tid)
1440    ->  Index Scan using t1_pkey on t1
1441          Index Cond: (id = t2.id)
1442          Filter: (ctid = '(1,1)'::tid)
1443 (6 rows)
1444
1445 /*+IndexScan(t2)*/
1446 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1447 LOG:  pg_hint_plan:
1448 used hint:
1449 IndexScan(t2)
1450 not used hint:
1451 duplication hint:
1452 error hint:
1453
1454                QUERY PLAN                
1455 -----------------------------------------
1456  Nested Loop
1457    ->  Tid Scan on t1
1458          TID Cond: (ctid = '(1,1)'::tid)
1459    ->  Index Scan using t2_pkey on t2
1460          Index Cond: (id = t1.id)
1461          Filter: (ctid = '(1,1)'::tid)
1462 (6 rows)
1463
1464 /*+IndexScan(t1) SeqScan(t2)*/
1465 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1466 LOG:  pg_hint_plan:
1467 used hint:
1468 IndexScan(t1)
1469 SeqScan(t2)
1470 not used hint:
1471 duplication hint:
1472 error hint:
1473
1474               QUERY PLAN               
1475 ---------------------------------------
1476  Nested Loop
1477    ->  Seq Scan on t2
1478          Filter: (ctid = '(1,1)'::tid)
1479    ->  Index Scan using t1_pkey on t1
1480          Index Cond: (id = t2.id)
1481          Filter: (ctid = '(1,1)'::tid)
1482 (6 rows)
1483
1484 /*+IndexScan(t1) IndexScan(t2)*/
1485 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1486 LOG:  pg_hint_plan:
1487 used hint:
1488 IndexScan(t1)
1489 IndexScan(t2)
1490 not used hint:
1491 duplication hint:
1492 error hint:
1493
1494               QUERY PLAN               
1495 ---------------------------------------
1496  Nested Loop
1497    ->  Index Scan using t2_pkey on t2
1498          Filter: (ctid = '(1,1)'::tid)
1499    ->  Index Scan using t1_pkey on t1
1500          Index Cond: (id = t2.id)
1501          Filter: (ctid = '(1,1)'::tid)
1502 (6 rows)
1503
1504 /*+IndexScan(t1) BitmapScan(t2)*/
1505 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1506 LOG:  pg_hint_plan:
1507 used hint:
1508 IndexScan(t1)
1509 BitmapScan(t2)
1510 not used hint:
1511 duplication hint:
1512 error hint:
1513
1514                 QUERY PLAN                
1515 ------------------------------------------
1516  Nested Loop
1517    ->  Index Scan using t1_pkey on t1
1518          Filter: (ctid = '(1,1)'::tid)
1519    ->  Bitmap Heap Scan on t2
1520          Recheck Cond: (id = t1.id)
1521          Filter: (ctid = '(1,1)'::tid)
1522          ->  Bitmap Index Scan on t2_pkey
1523                Index Cond: (id = t1.id)
1524 (8 rows)
1525
1526 /*+IndexScan(t1) TidScan(t2)*/
1527 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1528 LOG:  pg_hint_plan:
1529 used hint:
1530 IndexScan(t1)
1531 TidScan(t2)
1532 not used hint:
1533 duplication hint:
1534 error hint:
1535
1536                QUERY PLAN                
1537 -----------------------------------------
1538  Nested Loop
1539    ->  Tid Scan on t2
1540          TID Cond: (ctid = '(1,1)'::tid)
1541    ->  Index Scan using t1_pkey on t1
1542          Index Cond: (id = t2.id)
1543          Filter: (ctid = '(1,1)'::tid)
1544 (6 rows)
1545
1546 /*+IndexScan(t1) NoSeqScan(t2)*/
1547 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1548 LOG:  pg_hint_plan:
1549 used hint:
1550 IndexScan(t1)
1551 NoSeqScan(t2)
1552 not used hint:
1553 duplication hint:
1554 error hint:
1555
1556                QUERY PLAN                
1557 -----------------------------------------
1558  Nested Loop
1559    ->  Tid Scan on t2
1560          TID Cond: (ctid = '(1,1)'::tid)
1561    ->  Index Scan using t1_pkey on t1
1562          Index Cond: (id = t2.id)
1563          Filter: (ctid = '(1,1)'::tid)
1564 (6 rows)
1565
1566 /*+IndexScan(t1) NoIndexScan(t2)*/
1567 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1568 LOG:  pg_hint_plan:
1569 used hint:
1570 IndexScan(t1)
1571 NoIndexScan(t2)
1572 not used hint:
1573 duplication hint:
1574 error hint:
1575
1576                QUERY PLAN                
1577 -----------------------------------------
1578  Nested Loop
1579    ->  Tid Scan on t2
1580          TID Cond: (ctid = '(1,1)'::tid)
1581    ->  Index Scan using t1_pkey on t1
1582          Index Cond: (id = t2.id)
1583          Filter: (ctid = '(1,1)'::tid)
1584 (6 rows)
1585
1586 /*+IndexScan(t1) NoBitmapScan(t2)*/
1587 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1588 LOG:  pg_hint_plan:
1589 used hint:
1590 IndexScan(t1)
1591 NoBitmapScan(t2)
1592 not used hint:
1593 duplication hint:
1594 error hint:
1595
1596                QUERY PLAN                
1597 -----------------------------------------
1598  Nested Loop
1599    ->  Tid Scan on t2
1600          TID Cond: (ctid = '(1,1)'::tid)
1601    ->  Index Scan using t1_pkey on t1
1602          Index Cond: (id = t2.id)
1603          Filter: (ctid = '(1,1)'::tid)
1604 (6 rows)
1605
1606 /*+IndexScan(t1) NoTidScan(t2)*/
1607 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1608 LOG:  pg_hint_plan:
1609 used hint:
1610 IndexScan(t1)
1611 NoTidScan(t2)
1612 not used hint:
1613 duplication hint:
1614 error hint:
1615
1616               QUERY PLAN               
1617 ---------------------------------------
1618  Nested Loop
1619    ->  Seq Scan on t2
1620          Filter: (ctid = '(1,1)'::tid)
1621    ->  Index Scan using t1_pkey on t1
1622          Index Cond: (id = t2.id)
1623          Filter: (ctid = '(1,1)'::tid)
1624 (6 rows)
1625
1626 /*+BitmapScan(t1)*/
1627 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1628 LOG:  pg_hint_plan:
1629 used hint:
1630 BitmapScan(t1)
1631 not used hint:
1632 duplication hint:
1633 error hint:
1634
1635                 QUERY PLAN                
1636 ------------------------------------------
1637  Nested Loop
1638    ->  Tid Scan on t2
1639          TID Cond: (ctid = '(1,1)'::tid)
1640    ->  Bitmap Heap Scan on t1
1641          Recheck Cond: (id = t2.id)
1642          Filter: (ctid = '(1,1)'::tid)
1643          ->  Bitmap Index Scan on t1_pkey
1644                Index Cond: (id = t2.id)
1645 (8 rows)
1646
1647 /*+BitmapScan(t2)*/
1648 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1649 LOG:  pg_hint_plan:
1650 used hint:
1651 BitmapScan(t2)
1652 not used hint:
1653 duplication hint:
1654 error hint:
1655
1656                 QUERY PLAN                
1657 ------------------------------------------
1658  Nested Loop
1659    ->  Tid Scan on t1
1660          TID Cond: (ctid = '(1,1)'::tid)
1661    ->  Bitmap Heap Scan on t2
1662          Recheck Cond: (id = t1.id)
1663          Filter: (ctid = '(1,1)'::tid)
1664          ->  Bitmap Index Scan on t2_pkey
1665                Index Cond: (id = t1.id)
1666 (8 rows)
1667
1668 /*+BitmapScan(t2)*/
1669 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1670 LOG:  pg_hint_plan:
1671 used hint:
1672 BitmapScan(t2)
1673 not used hint:
1674 duplication hint:
1675 error hint:
1676
1677                 QUERY PLAN                
1678 ------------------------------------------
1679  Nested Loop
1680    ->  Tid Scan on t1
1681          TID Cond: (ctid = '(1,1)'::tid)
1682    ->  Bitmap Heap Scan on t2
1683          Recheck Cond: (id = t1.id)
1684          Filter: (ctid = '(1,1)'::tid)
1685          ->  Bitmap Index Scan on t2_pkey
1686                Index Cond: (id = t1.id)
1687 (8 rows)
1688
1689 /*+BitmapScan(t1) SeqScan(t2)*/
1690 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1691 LOG:  pg_hint_plan:
1692 used hint:
1693 BitmapScan(t1)
1694 SeqScan(t2)
1695 not used hint:
1696 duplication hint:
1697 error hint:
1698
1699                 QUERY PLAN                
1700 ------------------------------------------
1701  Nested Loop
1702    ->  Seq Scan on t2
1703          Filter: (ctid = '(1,1)'::tid)
1704    ->  Bitmap Heap Scan on t1
1705          Recheck Cond: (id = t2.id)
1706          Filter: (ctid = '(1,1)'::tid)
1707          ->  Bitmap Index Scan on t1_pkey
1708                Index Cond: (id = t2.id)
1709 (8 rows)
1710
1711 /*+BitmapScan(t1) IndexScan(t2)*/
1712 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1713 LOG:  pg_hint_plan:
1714 used hint:
1715 BitmapScan(t1)
1716 IndexScan(t2)
1717 not used hint:
1718 duplication hint:
1719 error hint:
1720
1721                 QUERY PLAN                
1722 ------------------------------------------
1723  Nested Loop
1724    ->  Index Scan using t2_pkey on t2
1725          Filter: (ctid = '(1,1)'::tid)
1726    ->  Bitmap Heap Scan on t1
1727          Recheck Cond: (id = t2.id)
1728          Filter: (ctid = '(1,1)'::tid)
1729          ->  Bitmap Index Scan on t1_pkey
1730                Index Cond: (id = t2.id)
1731 (8 rows)
1732
1733 /*+BitmapScan(t1) BitmapScan(t2)*/
1734 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1735 LOG:  pg_hint_plan:
1736 used hint:
1737 BitmapScan(t1)
1738 BitmapScan(t2)
1739 not used hint:
1740 duplication hint:
1741 error hint:
1742
1743                 QUERY PLAN                
1744 ------------------------------------------
1745  Nested Loop
1746    ->  Index Scan using t2_pkey on t2
1747          Filter: (ctid = '(1,1)'::tid)
1748    ->  Bitmap Heap Scan on t1
1749          Recheck Cond: (id = t2.id)
1750          Filter: (ctid = '(1,1)'::tid)
1751          ->  Bitmap Index Scan on t1_pkey
1752                Index Cond: (id = t2.id)
1753 (8 rows)
1754
1755 /*+BitmapScan(t1) TidScan(t2)*/
1756 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1757 LOG:  pg_hint_plan:
1758 used hint:
1759 BitmapScan(t1)
1760 TidScan(t2)
1761 not used hint:
1762 duplication hint:
1763 error hint:
1764
1765                 QUERY PLAN                
1766 ------------------------------------------
1767  Nested Loop
1768    ->  Tid Scan on t2
1769          TID Cond: (ctid = '(1,1)'::tid)
1770    ->  Bitmap Heap Scan on t1
1771          Recheck Cond: (id = t2.id)
1772          Filter: (ctid = '(1,1)'::tid)
1773          ->  Bitmap Index Scan on t1_pkey
1774                Index Cond: (id = t2.id)
1775 (8 rows)
1776
1777 /*+BitmapScan(t1) NoSeqScan(t2)*/
1778 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1779 LOG:  pg_hint_plan:
1780 used hint:
1781 BitmapScan(t1)
1782 NoSeqScan(t2)
1783 not used hint:
1784 duplication hint:
1785 error hint:
1786
1787                 QUERY PLAN                
1788 ------------------------------------------
1789  Nested Loop
1790    ->  Tid Scan on t2
1791          TID Cond: (ctid = '(1,1)'::tid)
1792    ->  Bitmap Heap Scan on t1
1793          Recheck Cond: (id = t2.id)
1794          Filter: (ctid = '(1,1)'::tid)
1795          ->  Bitmap Index Scan on t1_pkey
1796                Index Cond: (id = t2.id)
1797 (8 rows)
1798
1799 /*+BitmapScan(t1) NoIndexScan(t2)*/
1800 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1801 LOG:  pg_hint_plan:
1802 used hint:
1803 BitmapScan(t1)
1804 NoIndexScan(t2)
1805 not used hint:
1806 duplication hint:
1807 error hint:
1808
1809                 QUERY PLAN                
1810 ------------------------------------------
1811  Nested Loop
1812    ->  Tid Scan on t2
1813          TID Cond: (ctid = '(1,1)'::tid)
1814    ->  Bitmap Heap Scan on t1
1815          Recheck Cond: (id = t2.id)
1816          Filter: (ctid = '(1,1)'::tid)
1817          ->  Bitmap Index Scan on t1_pkey
1818                Index Cond: (id = t2.id)
1819 (8 rows)
1820
1821 /*+BitmapScan(t1) NoBitmapScan(t2)*/
1822 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1823 LOG:  pg_hint_plan:
1824 used hint:
1825 BitmapScan(t1)
1826 NoBitmapScan(t2)
1827 not used hint:
1828 duplication hint:
1829 error hint:
1830
1831                 QUERY PLAN                
1832 ------------------------------------------
1833  Nested Loop
1834    ->  Tid Scan on t2
1835          TID Cond: (ctid = '(1,1)'::tid)
1836    ->  Bitmap Heap Scan on t1
1837          Recheck Cond: (id = t2.id)
1838          Filter: (ctid = '(1,1)'::tid)
1839          ->  Bitmap Index Scan on t1_pkey
1840                Index Cond: (id = t2.id)
1841 (8 rows)
1842
1843 /*+BitmapScan(t1) NoTidScan(t2)*/
1844 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1845 LOG:  pg_hint_plan:
1846 used hint:
1847 BitmapScan(t1)
1848 NoTidScan(t2)
1849 not used hint:
1850 duplication hint:
1851 error hint:
1852
1853                 QUERY PLAN                
1854 ------------------------------------------
1855  Nested Loop
1856    ->  Seq Scan on t2
1857          Filter: (ctid = '(1,1)'::tid)
1858    ->  Bitmap Heap Scan on t1
1859          Recheck Cond: (id = t2.id)
1860          Filter: (ctid = '(1,1)'::tid)
1861          ->  Bitmap Index Scan on t1_pkey
1862                Index Cond: (id = t2.id)
1863 (8 rows)
1864
1865 /*+TidScan(t1)*/
1866 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1867 LOG:  pg_hint_plan:
1868 used hint:
1869 TidScan(t1)
1870 not used hint:
1871 duplication hint:
1872 error hint:
1873
1874                QUERY PLAN                
1875 -----------------------------------------
1876  Nested Loop
1877    Join Filter: (t1.id = t2.id)
1878    ->  Tid Scan on t1
1879          TID Cond: (ctid = '(1,1)'::tid)
1880    ->  Tid Scan on t2
1881          TID Cond: (ctid = '(1,1)'::tid)
1882 (6 rows)
1883
1884 /*+TidScan(t2)*/
1885 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1886 LOG:  pg_hint_plan:
1887 used hint:
1888 TidScan(t2)
1889 not used hint:
1890 duplication hint:
1891 error hint:
1892
1893                QUERY PLAN                
1894 -----------------------------------------
1895  Nested Loop
1896    Join Filter: (t1.id = t2.id)
1897    ->  Tid Scan on t1
1898          TID Cond: (ctid = '(1,1)'::tid)
1899    ->  Tid Scan on t2
1900          TID Cond: (ctid = '(1,1)'::tid)
1901 (6 rows)
1902
1903 /*+TidScan(t1) SeqScan(t2)*/
1904 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1905 LOG:  pg_hint_plan:
1906 used hint:
1907 TidScan(t1)
1908 SeqScan(t2)
1909 not used hint:
1910 duplication hint:
1911 error hint:
1912
1913                QUERY PLAN                
1914 -----------------------------------------
1915  Nested Loop
1916    Join Filter: (t1.id = t2.id)
1917    ->  Tid Scan on t1
1918          TID Cond: (ctid = '(1,1)'::tid)
1919    ->  Seq Scan on t2
1920          Filter: (ctid = '(1,1)'::tid)
1921 (6 rows)
1922
1923 /*+TidScan(t1) IndexScan(t2)*/
1924 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1925 LOG:  pg_hint_plan:
1926 used hint:
1927 TidScan(t1)
1928 IndexScan(t2)
1929 not used hint:
1930 duplication hint:
1931 error hint:
1932
1933                QUERY PLAN                
1934 -----------------------------------------
1935  Nested Loop
1936    ->  Tid Scan on t1
1937          TID Cond: (ctid = '(1,1)'::tid)
1938    ->  Index Scan using t2_pkey on t2
1939          Index Cond: (id = t1.id)
1940          Filter: (ctid = '(1,1)'::tid)
1941 (6 rows)
1942
1943 /*+TidScan(t1) BitmapScan(t2)*/
1944 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1945 LOG:  pg_hint_plan:
1946 used hint:
1947 TidScan(t1)
1948 BitmapScan(t2)
1949 not used hint:
1950 duplication hint:
1951 error hint:
1952
1953                 QUERY PLAN                
1954 ------------------------------------------
1955  Nested Loop
1956    ->  Tid Scan on t1
1957          TID Cond: (ctid = '(1,1)'::tid)
1958    ->  Bitmap Heap Scan on t2
1959          Recheck Cond: (id = t1.id)
1960          Filter: (ctid = '(1,1)'::tid)
1961          ->  Bitmap Index Scan on t2_pkey
1962                Index Cond: (id = t1.id)
1963 (8 rows)
1964
1965 /*+TidScan(t1) TidScan(t2)*/
1966 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1967 LOG:  pg_hint_plan:
1968 used hint:
1969 TidScan(t1)
1970 TidScan(t2)
1971 not used hint:
1972 duplication hint:
1973 error hint:
1974
1975                QUERY PLAN                
1976 -----------------------------------------
1977  Nested Loop
1978    Join Filter: (t1.id = t2.id)
1979    ->  Tid Scan on t1
1980          TID Cond: (ctid = '(1,1)'::tid)
1981    ->  Tid Scan on t2
1982          TID Cond: (ctid = '(1,1)'::tid)
1983 (6 rows)
1984
1985 /*+TidScan(t1) NoSeqScan(t2)*/
1986 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1987 LOG:  pg_hint_plan:
1988 used hint:
1989 TidScan(t1)
1990 NoSeqScan(t2)
1991 not used hint:
1992 duplication hint:
1993 error hint:
1994
1995                QUERY PLAN                
1996 -----------------------------------------
1997  Nested Loop
1998    Join Filter: (t1.id = t2.id)
1999    ->  Tid Scan on t1
2000          TID Cond: (ctid = '(1,1)'::tid)
2001    ->  Tid Scan on t2
2002          TID Cond: (ctid = '(1,1)'::tid)
2003 (6 rows)
2004
2005 /*+TidScan(t1) NoIndexScan(t2)*/
2006 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2007 LOG:  pg_hint_plan:
2008 used hint:
2009 TidScan(t1)
2010 NoIndexScan(t2)
2011 not used hint:
2012 duplication hint:
2013 error hint:
2014
2015                QUERY PLAN                
2016 -----------------------------------------
2017  Nested Loop
2018    Join Filter: (t1.id = t2.id)
2019    ->  Tid Scan on t1
2020          TID Cond: (ctid = '(1,1)'::tid)
2021    ->  Tid Scan on t2
2022          TID Cond: (ctid = '(1,1)'::tid)
2023 (6 rows)
2024
2025 /*+TidScan(t1) NoBitmapScan(t2)*/
2026 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2027 LOG:  pg_hint_plan:
2028 used hint:
2029 TidScan(t1)
2030 NoBitmapScan(t2)
2031 not used hint:
2032 duplication hint:
2033 error hint:
2034
2035                QUERY PLAN                
2036 -----------------------------------------
2037  Nested Loop
2038    Join Filter: (t1.id = t2.id)
2039    ->  Tid Scan on t1
2040          TID Cond: (ctid = '(1,1)'::tid)
2041    ->  Tid Scan on t2
2042          TID Cond: (ctid = '(1,1)'::tid)
2043 (6 rows)
2044
2045 /*+TidScan(t1) NoTidScan(t2)*/
2046 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2047 LOG:  pg_hint_plan:
2048 used hint:
2049 TidScan(t1)
2050 NoTidScan(t2)
2051 not used hint:
2052 duplication hint:
2053 error hint:
2054
2055                QUERY PLAN                
2056 -----------------------------------------
2057  Nested Loop
2058    ->  Tid Scan on t1
2059          TID Cond: (ctid = '(1,1)'::tid)
2060    ->  Index Scan using t2_pkey on t2
2061          Index Cond: (id = t1.id)
2062          Filter: (ctid = '(1,1)'::tid)
2063 (6 rows)
2064
2065 /*+NoSeqScan(t1)*/
2066 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2067 LOG:  pg_hint_plan:
2068 used hint:
2069 NoSeqScan(t1)
2070 not used hint:
2071 duplication hint:
2072 error hint:
2073
2074                QUERY PLAN                
2075 -----------------------------------------
2076  Nested Loop
2077    Join Filter: (t1.id = t2.id)
2078    ->  Tid Scan on t1
2079          TID Cond: (ctid = '(1,1)'::tid)
2080    ->  Tid Scan on t2
2081          TID Cond: (ctid = '(1,1)'::tid)
2082 (6 rows)
2083
2084 /*+NoSeqScan(t2)*/
2085 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2086 LOG:  pg_hint_plan:
2087 used hint:
2088 NoSeqScan(t2)
2089 not used hint:
2090 duplication hint:
2091 error hint:
2092
2093                QUERY PLAN                
2094 -----------------------------------------
2095  Nested Loop
2096    Join Filter: (t1.id = t2.id)
2097    ->  Tid Scan on t1
2098          TID Cond: (ctid = '(1,1)'::tid)
2099    ->  Tid Scan on t2
2100          TID Cond: (ctid = '(1,1)'::tid)
2101 (6 rows)
2102
2103 /*+NoSeqScan(t1) SeqScan(t2)*/
2104 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2105 LOG:  pg_hint_plan:
2106 used hint:
2107 NoSeqScan(t1)
2108 SeqScan(t2)
2109 not used hint:
2110 duplication hint:
2111 error hint:
2112
2113                QUERY PLAN                
2114 -----------------------------------------
2115  Nested Loop
2116    Join Filter: (t1.id = t2.id)
2117    ->  Tid Scan on t1
2118          TID Cond: (ctid = '(1,1)'::tid)
2119    ->  Seq Scan on t2
2120          Filter: (ctid = '(1,1)'::tid)
2121 (6 rows)
2122
2123 /*+NoSeqScan(t1) IndexScan(t2)*/
2124 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2125 LOG:  pg_hint_plan:
2126 used hint:
2127 NoSeqScan(t1)
2128 IndexScan(t2)
2129 not used hint:
2130 duplication hint:
2131 error hint:
2132
2133                QUERY PLAN                
2134 -----------------------------------------
2135  Nested Loop
2136    ->  Tid Scan on t1
2137          TID Cond: (ctid = '(1,1)'::tid)
2138    ->  Index Scan using t2_pkey on t2
2139          Index Cond: (id = t1.id)
2140          Filter: (ctid = '(1,1)'::tid)
2141 (6 rows)
2142
2143 /*+NoSeqScan(t1) BitmapScan(t2)*/
2144 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2145 LOG:  pg_hint_plan:
2146 used hint:
2147 NoSeqScan(t1)
2148 BitmapScan(t2)
2149 not used hint:
2150 duplication hint:
2151 error hint:
2152
2153                 QUERY PLAN                
2154 ------------------------------------------
2155  Nested Loop
2156    ->  Tid Scan on t1
2157          TID Cond: (ctid = '(1,1)'::tid)
2158    ->  Bitmap Heap Scan on t2
2159          Recheck Cond: (id = t1.id)
2160          Filter: (ctid = '(1,1)'::tid)
2161          ->  Bitmap Index Scan on t2_pkey
2162                Index Cond: (id = t1.id)
2163 (8 rows)
2164
2165 /*+NoSeqScan(t1) TidScan(t2)*/
2166 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2167 LOG:  pg_hint_plan:
2168 used hint:
2169 NoSeqScan(t1)
2170 TidScan(t2)
2171 not used hint:
2172 duplication hint:
2173 error hint:
2174
2175                QUERY PLAN                
2176 -----------------------------------------
2177  Nested Loop
2178    Join Filter: (t1.id = t2.id)
2179    ->  Tid Scan on t1
2180          TID Cond: (ctid = '(1,1)'::tid)
2181    ->  Tid Scan on t2
2182          TID Cond: (ctid = '(1,1)'::tid)
2183 (6 rows)
2184
2185 /*+NoSeqScan(t1) NoSeqScan(t2)*/
2186 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2187 LOG:  pg_hint_plan:
2188 used hint:
2189 NoSeqScan(t1)
2190 NoSeqScan(t2)
2191 not used hint:
2192 duplication hint:
2193 error hint:
2194
2195                QUERY PLAN                
2196 -----------------------------------------
2197  Nested Loop
2198    Join Filter: (t1.id = t2.id)
2199    ->  Tid Scan on t1
2200          TID Cond: (ctid = '(1,1)'::tid)
2201    ->  Tid Scan on t2
2202          TID Cond: (ctid = '(1,1)'::tid)
2203 (6 rows)
2204
2205 /*+NoSeqScan(t1) NoIndexScan(t2)*/
2206 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2207 LOG:  pg_hint_plan:
2208 used hint:
2209 NoSeqScan(t1)
2210 NoIndexScan(t2)
2211 not used hint:
2212 duplication hint:
2213 error hint:
2214
2215                QUERY PLAN                
2216 -----------------------------------------
2217  Nested Loop
2218    Join Filter: (t1.id = t2.id)
2219    ->  Tid Scan on t1
2220          TID Cond: (ctid = '(1,1)'::tid)
2221    ->  Tid Scan on t2
2222          TID Cond: (ctid = '(1,1)'::tid)
2223 (6 rows)
2224
2225 /*+NoSeqScan(t1) NoBitmapScan(t2)*/
2226 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2227 LOG:  pg_hint_plan:
2228 used hint:
2229 NoSeqScan(t1)
2230 NoBitmapScan(t2)
2231 not used hint:
2232 duplication hint:
2233 error hint:
2234
2235                QUERY PLAN                
2236 -----------------------------------------
2237  Nested Loop
2238    Join Filter: (t1.id = t2.id)
2239    ->  Tid Scan on t1
2240          TID Cond: (ctid = '(1,1)'::tid)
2241    ->  Tid Scan on t2
2242          TID Cond: (ctid = '(1,1)'::tid)
2243 (6 rows)
2244
2245 /*+NoSeqScan(t1) NoTidScan(t2)*/
2246 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2247 LOG:  pg_hint_plan:
2248 used hint:
2249 NoSeqScan(t1)
2250 NoTidScan(t2)
2251 not used hint:
2252 duplication hint:
2253 error hint:
2254
2255                QUERY PLAN                
2256 -----------------------------------------
2257  Nested Loop
2258    ->  Tid Scan on t1
2259          TID Cond: (ctid = '(1,1)'::tid)
2260    ->  Index Scan using t2_pkey on t2
2261          Index Cond: (id = t1.id)
2262          Filter: (ctid = '(1,1)'::tid)
2263 (6 rows)
2264
2265 /*+NoIndexScan(t1)*/
2266 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2267 LOG:  pg_hint_plan:
2268 used hint:
2269 NoIndexScan(t1)
2270 not used hint:
2271 duplication hint:
2272 error hint:
2273
2274                QUERY PLAN                
2275 -----------------------------------------
2276  Nested Loop
2277    Join Filter: (t1.id = t2.id)
2278    ->  Tid Scan on t1
2279          TID Cond: (ctid = '(1,1)'::tid)
2280    ->  Tid Scan on t2
2281          TID Cond: (ctid = '(1,1)'::tid)
2282 (6 rows)
2283
2284 /*+NoIndexScan(t2)*/
2285 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2286 LOG:  pg_hint_plan:
2287 used hint:
2288 NoIndexScan(t2)
2289 not used hint:
2290 duplication hint:
2291 error hint:
2292
2293                QUERY PLAN                
2294 -----------------------------------------
2295  Nested Loop
2296    Join Filter: (t1.id = t2.id)
2297    ->  Tid Scan on t1
2298          TID Cond: (ctid = '(1,1)'::tid)
2299    ->  Tid Scan on t2
2300          TID Cond: (ctid = '(1,1)'::tid)
2301 (6 rows)
2302
2303 /*+NoIndexScan(t1) SeqScan(t2)*/
2304 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2305 LOG:  pg_hint_plan:
2306 used hint:
2307 NoIndexScan(t1)
2308 SeqScan(t2)
2309 not used hint:
2310 duplication hint:
2311 error hint:
2312
2313                QUERY PLAN                
2314 -----------------------------------------
2315  Nested Loop
2316    Join Filter: (t1.id = t2.id)
2317    ->  Tid Scan on t1
2318          TID Cond: (ctid = '(1,1)'::tid)
2319    ->  Seq Scan on t2
2320          Filter: (ctid = '(1,1)'::tid)
2321 (6 rows)
2322
2323 /*+NoIndexScan(t1) IndexScan(t2)*/
2324 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2325 LOG:  pg_hint_plan:
2326 used hint:
2327 NoIndexScan(t1)
2328 IndexScan(t2)
2329 not used hint:
2330 duplication hint:
2331 error hint:
2332
2333                QUERY PLAN                
2334 -----------------------------------------
2335  Nested Loop
2336    ->  Tid Scan on t1
2337          TID Cond: (ctid = '(1,1)'::tid)
2338    ->  Index Scan using t2_pkey on t2
2339          Index Cond: (id = t1.id)
2340          Filter: (ctid = '(1,1)'::tid)
2341 (6 rows)
2342
2343 /*+NoIndexScan(t1) BitmapScan(t2)*/
2344 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2345 LOG:  pg_hint_plan:
2346 used hint:
2347 NoIndexScan(t1)
2348 BitmapScan(t2)
2349 not used hint:
2350 duplication hint:
2351 error hint:
2352
2353                 QUERY PLAN                
2354 ------------------------------------------
2355  Nested Loop
2356    ->  Tid Scan on t1
2357          TID Cond: (ctid = '(1,1)'::tid)
2358    ->  Bitmap Heap Scan on t2
2359          Recheck Cond: (id = t1.id)
2360          Filter: (ctid = '(1,1)'::tid)
2361          ->  Bitmap Index Scan on t2_pkey
2362                Index Cond: (id = t1.id)
2363 (8 rows)
2364
2365 /*+NoIndexScan(t1) TidScan(t2)*/
2366 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2367 LOG:  pg_hint_plan:
2368 used hint:
2369 NoIndexScan(t1)
2370 TidScan(t2)
2371 not used hint:
2372 duplication hint:
2373 error hint:
2374
2375                QUERY PLAN                
2376 -----------------------------------------
2377  Nested Loop
2378    Join Filter: (t1.id = t2.id)
2379    ->  Tid Scan on t1
2380          TID Cond: (ctid = '(1,1)'::tid)
2381    ->  Tid Scan on t2
2382          TID Cond: (ctid = '(1,1)'::tid)
2383 (6 rows)
2384
2385 /*+NoIndexScan(t1) NoSeqScan(t2)*/
2386 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2387 LOG:  pg_hint_plan:
2388 used hint:
2389 NoIndexScan(t1)
2390 NoSeqScan(t2)
2391 not used hint:
2392 duplication hint:
2393 error hint:
2394
2395                QUERY PLAN                
2396 -----------------------------------------
2397  Nested Loop
2398    Join Filter: (t1.id = t2.id)
2399    ->  Tid Scan on t1
2400          TID Cond: (ctid = '(1,1)'::tid)
2401    ->  Tid Scan on t2
2402          TID Cond: (ctid = '(1,1)'::tid)
2403 (6 rows)
2404
2405 /*+NoIndexScan(t1) NoIndexScan(t2)*/
2406 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2407 LOG:  pg_hint_plan:
2408 used hint:
2409 NoIndexScan(t1)
2410 NoIndexScan(t2)
2411 not used hint:
2412 duplication hint:
2413 error hint:
2414
2415                QUERY PLAN                
2416 -----------------------------------------
2417  Nested Loop
2418    Join Filter: (t1.id = t2.id)
2419    ->  Tid Scan on t1
2420          TID Cond: (ctid = '(1,1)'::tid)
2421    ->  Tid Scan on t2
2422          TID Cond: (ctid = '(1,1)'::tid)
2423 (6 rows)
2424
2425 /*+NoIndexScan(t1) NoBitmapScan(t2)*/
2426 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2427 LOG:  pg_hint_plan:
2428 used hint:
2429 NoIndexScan(t1)
2430 NoBitmapScan(t2)
2431 not used hint:
2432 duplication hint:
2433 error hint:
2434
2435                QUERY PLAN                
2436 -----------------------------------------
2437  Nested Loop
2438    Join Filter: (t1.id = t2.id)
2439    ->  Tid Scan on t1
2440          TID Cond: (ctid = '(1,1)'::tid)
2441    ->  Tid Scan on t2
2442          TID Cond: (ctid = '(1,1)'::tid)
2443 (6 rows)
2444
2445 /*+NoIndexScan(t1) NoTidScan(t2)*/
2446 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2447 LOG:  pg_hint_plan:
2448 used hint:
2449 NoIndexScan(t1)
2450 NoTidScan(t2)
2451 not used hint:
2452 duplication hint:
2453 error hint:
2454
2455                QUERY PLAN                
2456 -----------------------------------------
2457  Nested Loop
2458    ->  Tid Scan on t1
2459          TID Cond: (ctid = '(1,1)'::tid)
2460    ->  Index Scan using t2_pkey on t2
2461          Index Cond: (id = t1.id)
2462          Filter: (ctid = '(1,1)'::tid)
2463 (6 rows)
2464
2465 /*+NoBitmapScan(t1)*/
2466 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2467 LOG:  pg_hint_plan:
2468 used hint:
2469 NoBitmapScan(t1)
2470 not used hint:
2471 duplication hint:
2472 error hint:
2473
2474                QUERY PLAN                
2475 -----------------------------------------
2476  Nested Loop
2477    Join Filter: (t1.id = t2.id)
2478    ->  Tid Scan on t1
2479          TID Cond: (ctid = '(1,1)'::tid)
2480    ->  Tid Scan on t2
2481          TID Cond: (ctid = '(1,1)'::tid)
2482 (6 rows)
2483
2484 /*+NoBitmapScan(t2)*/
2485 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2486 LOG:  pg_hint_plan:
2487 used hint:
2488 NoBitmapScan(t2)
2489 not used hint:
2490 duplication hint:
2491 error hint:
2492
2493                QUERY PLAN                
2494 -----------------------------------------
2495  Nested Loop
2496    Join Filter: (t1.id = t2.id)
2497    ->  Tid Scan on t1
2498          TID Cond: (ctid = '(1,1)'::tid)
2499    ->  Tid Scan on t2
2500          TID Cond: (ctid = '(1,1)'::tid)
2501 (6 rows)
2502
2503 /*+NoBitmapScan(t1) SeqScan(t2)*/
2504 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2505 LOG:  pg_hint_plan:
2506 used hint:
2507 NoBitmapScan(t1)
2508 SeqScan(t2)
2509 not used hint:
2510 duplication hint:
2511 error hint:
2512
2513                QUERY PLAN                
2514 -----------------------------------------
2515  Nested Loop
2516    Join Filter: (t1.id = t2.id)
2517    ->  Tid Scan on t1
2518          TID Cond: (ctid = '(1,1)'::tid)
2519    ->  Seq Scan on t2
2520          Filter: (ctid = '(1,1)'::tid)
2521 (6 rows)
2522
2523 /*+NoBitmapScan(t1) IndexScan(t2)*/
2524 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2525 LOG:  pg_hint_plan:
2526 used hint:
2527 NoBitmapScan(t1)
2528 IndexScan(t2)
2529 not used hint:
2530 duplication hint:
2531 error hint:
2532
2533                QUERY PLAN                
2534 -----------------------------------------
2535  Nested Loop
2536    ->  Tid Scan on t1
2537          TID Cond: (ctid = '(1,1)'::tid)
2538    ->  Index Scan using t2_pkey on t2
2539          Index Cond: (id = t1.id)
2540          Filter: (ctid = '(1,1)'::tid)
2541 (6 rows)
2542
2543 /*+NoBitmapScan(t1) BitmapScan(t2)*/
2544 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2545 LOG:  pg_hint_plan:
2546 used hint:
2547 NoBitmapScan(t1)
2548 BitmapScan(t2)
2549 not used hint:
2550 duplication hint:
2551 error hint:
2552
2553                 QUERY PLAN                
2554 ------------------------------------------
2555  Nested Loop
2556    ->  Tid Scan on t1
2557          TID Cond: (ctid = '(1,1)'::tid)
2558    ->  Bitmap Heap Scan on t2
2559          Recheck Cond: (id = t1.id)
2560          Filter: (ctid = '(1,1)'::tid)
2561          ->  Bitmap Index Scan on t2_pkey
2562                Index Cond: (id = t1.id)
2563 (8 rows)
2564
2565 /*+NoBitmapScan(t1) TidScan(t2)*/
2566 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2567 LOG:  pg_hint_plan:
2568 used hint:
2569 NoBitmapScan(t1)
2570 TidScan(t2)
2571 not used hint:
2572 duplication hint:
2573 error hint:
2574
2575                QUERY PLAN                
2576 -----------------------------------------
2577  Nested Loop
2578    Join Filter: (t1.id = t2.id)
2579    ->  Tid Scan on t1
2580          TID Cond: (ctid = '(1,1)'::tid)
2581    ->  Tid Scan on t2
2582          TID Cond: (ctid = '(1,1)'::tid)
2583 (6 rows)
2584
2585 /*+NoBitmapScan(t1) NoSeqScan(t2)*/
2586 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2587 LOG:  pg_hint_plan:
2588 used hint:
2589 NoBitmapScan(t1)
2590 NoSeqScan(t2)
2591 not used hint:
2592 duplication hint:
2593 error hint:
2594
2595                QUERY PLAN                
2596 -----------------------------------------
2597  Nested Loop
2598    Join Filter: (t1.id = t2.id)
2599    ->  Tid Scan on t1
2600          TID Cond: (ctid = '(1,1)'::tid)
2601    ->  Tid Scan on t2
2602          TID Cond: (ctid = '(1,1)'::tid)
2603 (6 rows)
2604
2605 /*+NoBitmapScan(t1) NoIndexScan(t2)*/
2606 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2607 LOG:  pg_hint_plan:
2608 used hint:
2609 NoBitmapScan(t1)
2610 NoIndexScan(t2)
2611 not used hint:
2612 duplication hint:
2613 error hint:
2614
2615                QUERY PLAN                
2616 -----------------------------------------
2617  Nested Loop
2618    Join Filter: (t1.id = t2.id)
2619    ->  Tid Scan on t1
2620          TID Cond: (ctid = '(1,1)'::tid)
2621    ->  Tid Scan on t2
2622          TID Cond: (ctid = '(1,1)'::tid)
2623 (6 rows)
2624
2625 /*+NoBitmapScan(t1) NoBitmapScan(t2)*/
2626 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2627 LOG:  pg_hint_plan:
2628 used hint:
2629 NoBitmapScan(t1)
2630 NoBitmapScan(t2)
2631 not used hint:
2632 duplication hint:
2633 error hint:
2634
2635                QUERY PLAN                
2636 -----------------------------------------
2637  Nested Loop
2638    Join Filter: (t1.id = t2.id)
2639    ->  Tid Scan on t1
2640          TID Cond: (ctid = '(1,1)'::tid)
2641    ->  Tid Scan on t2
2642          TID Cond: (ctid = '(1,1)'::tid)
2643 (6 rows)
2644
2645 /*+NoBitmapScan(t1) NoTidScan(t2)*/
2646 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2647 LOG:  pg_hint_plan:
2648 used hint:
2649 NoBitmapScan(t1)
2650 NoTidScan(t2)
2651 not used hint:
2652 duplication hint:
2653 error hint:
2654
2655                QUERY PLAN                
2656 -----------------------------------------
2657  Nested Loop
2658    ->  Tid Scan on t1
2659          TID Cond: (ctid = '(1,1)'::tid)
2660    ->  Index Scan using t2_pkey on t2
2661          Index Cond: (id = t1.id)
2662          Filter: (ctid = '(1,1)'::tid)
2663 (6 rows)
2664
2665 /*+NoTidScan(t1)*/
2666 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2667 LOG:  pg_hint_plan:
2668 used hint:
2669 NoTidScan(t1)
2670 not used hint:
2671 duplication hint:
2672 error hint:
2673
2674                QUERY PLAN                
2675 -----------------------------------------
2676  Nested Loop
2677    ->  Tid Scan on t2
2678          TID Cond: (ctid = '(1,1)'::tid)
2679    ->  Index Scan using t1_pkey on t1
2680          Index Cond: (id = t2.id)
2681          Filter: (ctid = '(1,1)'::tid)
2682 (6 rows)
2683
2684 /*+NoTidScan(t2)*/
2685 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2686 LOG:  pg_hint_plan:
2687 used hint:
2688 NoTidScan(t2)
2689 not used hint:
2690 duplication hint:
2691 error hint:
2692
2693                QUERY PLAN                
2694 -----------------------------------------
2695  Nested Loop
2696    ->  Tid Scan on t1
2697          TID Cond: (ctid = '(1,1)'::tid)
2698    ->  Index Scan using t2_pkey on t2
2699          Index Cond: (id = t1.id)
2700          Filter: (ctid = '(1,1)'::tid)
2701 (6 rows)
2702
2703 /*+NoTidScan(t1) SeqScan(t2)*/
2704 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2705 LOG:  pg_hint_plan:
2706 used hint:
2707 NoTidScan(t1)
2708 SeqScan(t2)
2709 not used hint:
2710 duplication hint:
2711 error hint:
2712
2713               QUERY PLAN               
2714 ---------------------------------------
2715  Nested Loop
2716    ->  Seq Scan on t2
2717          Filter: (ctid = '(1,1)'::tid)
2718    ->  Index Scan using t1_pkey on t1
2719          Index Cond: (id = t2.id)
2720          Filter: (ctid = '(1,1)'::tid)
2721 (6 rows)
2722
2723 /*+NoTidScan(t1) IndexScan(t2)*/
2724 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2725 LOG:  pg_hint_plan:
2726 used hint:
2727 NoTidScan(t1)
2728 IndexScan(t2)
2729 not used hint:
2730 duplication hint:
2731 error hint:
2732
2733               QUERY PLAN               
2734 ---------------------------------------
2735  Nested Loop
2736    ->  Index Scan using t2_pkey on t2
2737          Filter: (ctid = '(1,1)'::tid)
2738    ->  Index Scan using t1_pkey on t1
2739          Index Cond: (id = t2.id)
2740          Filter: (ctid = '(1,1)'::tid)
2741 (6 rows)
2742
2743 /*+NoTidScan(t1) BitmapScan(t2)*/
2744 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2745 LOG:  pg_hint_plan:
2746 used hint:
2747 NoTidScan(t1)
2748 BitmapScan(t2)
2749 not used hint:
2750 duplication hint:
2751 error hint:
2752
2753                 QUERY PLAN                
2754 ------------------------------------------
2755  Nested Loop
2756    ->  Seq Scan on t1
2757          Filter: (ctid = '(1,1)'::tid)
2758    ->  Bitmap Heap Scan on t2
2759          Recheck Cond: (id = t1.id)
2760          Filter: (ctid = '(1,1)'::tid)
2761          ->  Bitmap Index Scan on t2_pkey
2762                Index Cond: (id = t1.id)
2763 (8 rows)
2764
2765 /*+NoTidScan(t1) TidScan(t2)*/
2766 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2767 LOG:  pg_hint_plan:
2768 used hint:
2769 NoTidScan(t1)
2770 TidScan(t2)
2771 not used hint:
2772 duplication hint:
2773 error hint:
2774
2775                QUERY PLAN                
2776 -----------------------------------------
2777  Nested Loop
2778    ->  Tid Scan on t2
2779          TID Cond: (ctid = '(1,1)'::tid)
2780    ->  Index Scan using t1_pkey on t1
2781          Index Cond: (id = t2.id)
2782          Filter: (ctid = '(1,1)'::tid)
2783 (6 rows)
2784
2785 /*+NoTidScan(t1) NoSeqScan(t2)*/
2786 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2787 LOG:  pg_hint_plan:
2788 used hint:
2789 NoTidScan(t1)
2790 NoSeqScan(t2)
2791 not used hint:
2792 duplication hint:
2793 error hint:
2794
2795                QUERY PLAN                
2796 -----------------------------------------
2797  Nested Loop
2798    ->  Tid Scan on t2
2799          TID Cond: (ctid = '(1,1)'::tid)
2800    ->  Index Scan using t1_pkey on t1
2801          Index Cond: (id = t2.id)
2802          Filter: (ctid = '(1,1)'::tid)
2803 (6 rows)
2804
2805 /*+NoTidScan(t1) NoIndexScan(t2)*/
2806 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2807 LOG:  pg_hint_plan:
2808 used hint:
2809 NoTidScan(t1)
2810 NoIndexScan(t2)
2811 not used hint:
2812 duplication hint:
2813 error hint:
2814
2815                QUERY PLAN                
2816 -----------------------------------------
2817  Nested Loop
2818    ->  Tid Scan on t2
2819          TID Cond: (ctid = '(1,1)'::tid)
2820    ->  Index Scan using t1_pkey on t1
2821          Index Cond: (id = t2.id)
2822          Filter: (ctid = '(1,1)'::tid)
2823 (6 rows)
2824
2825 /*+NoTidScan(t1) NoBitmapScan(t2)*/
2826 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2827 LOG:  pg_hint_plan:
2828 used hint:
2829 NoTidScan(t1)
2830 NoBitmapScan(t2)
2831 not used hint:
2832 duplication hint:
2833 error hint:
2834
2835                QUERY PLAN                
2836 -----------------------------------------
2837  Nested Loop
2838    ->  Tid Scan on t2
2839          TID Cond: (ctid = '(1,1)'::tid)
2840    ->  Index Scan using t1_pkey on t1
2841          Index Cond: (id = t2.id)
2842          Filter: (ctid = '(1,1)'::tid)
2843 (6 rows)
2844
2845 /*+NoTidScan(t1) NoTidScan(t2)*/
2846 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2847 LOG:  pg_hint_plan:
2848 used hint:
2849 NoTidScan(t1)
2850 NoTidScan(t2)
2851 not used hint:
2852 duplication hint:
2853 error hint:
2854
2855               QUERY PLAN               
2856 ---------------------------------------
2857  Nested Loop
2858    ->  Seq Scan on t2
2859          Filter: (ctid = '(1,1)'::tid)
2860    ->  Index Scan using t1_pkey on t1
2861          Index Cond: (id = t2.id)
2862          Filter: (ctid = '(1,1)'::tid)
2863 (6 rows)
2864
2865 -- additional test
2866 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)' AND t1.id < 10 AND t2.id < 10;
2867                QUERY PLAN                
2868 -----------------------------------------
2869  Nested Loop
2870    Join Filter: (t1.id = t2.id)
2871    ->  Tid Scan on t1
2872          TID Cond: (ctid = '(1,1)'::tid)
2873          Filter: (id < 10)
2874    ->  Tid Scan on t2
2875          TID Cond: (ctid = '(1,1)'::tid)
2876          Filter: (id < 10)
2877 (8 rows)
2878
2879 /*+BitmapScan(t1) BitmapScan(t2)*/
2880 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)' AND t1.id < 10 AND t2.id < 10;
2881 LOG:  pg_hint_plan:
2882 used hint:
2883 BitmapScan(t1)
2884 BitmapScan(t2)
2885 not used hint:
2886 duplication hint:
2887 error hint:
2888
2889                        QUERY PLAN                       
2890 --------------------------------------------------------
2891  Nested Loop
2892    ->  Bitmap Heap Scan on t2
2893          Recheck Cond: (id < 10)
2894          Filter: (ctid = '(1,1)'::tid)
2895          ->  Bitmap Index Scan on t2_pkey
2896                Index Cond: (id < 10)
2897    ->  Bitmap Heap Scan on t1
2898          Recheck Cond: ((id < 10) AND (id = t2.id))
2899          Filter: (ctid = '(1,1)'::tid)
2900          ->  Bitmap Index Scan on t1_pkey
2901                Index Cond: ((id < 10) AND (id = t2.id))
2902 (11 rows)
2903
2904 -- outer join test
2905 EXPLAIN (COSTS false) SELECT * FROM t1 FULL OUTER JOIN  t2 ON (t1.id = t2.id);
2906           QUERY PLAN          
2907 ------------------------------
2908  Hash Full Join
2909    Hash Cond: (t1.id = t2.id)
2910    ->  Seq Scan on t1
2911    ->  Hash
2912          ->  Seq Scan on t2
2913 (5 rows)
2914
2915 /*+MergeJoin(t1 t2)*/
2916 EXPLAIN (COSTS false) SELECT * FROM t1 FULL OUTER JOIN  t2 ON (t1.id = t2.id);
2917 LOG:  pg_hint_plan:
2918 used hint:
2919 MergeJoin(t1 t2)
2920 not used hint:
2921 duplication hint:
2922 error hint:
2923
2924               QUERY PLAN              
2925 --------------------------------------
2926  Merge Full Join
2927    Merge Cond: (t1.id = t2.id)
2928    ->  Index Scan using t1_pkey on t1
2929    ->  Index Scan using t2_pkey on t2
2930 (4 rows)
2931
2932 /*+NestLoop(t1 t2)*/
2933 EXPLAIN (COSTS false) SELECT * FROM t1 FULL OUTER JOIN  t2 ON (t1.id = t2.id);
2934 LOG:  pg_hint_plan:
2935 used hint:
2936 NestLoop(t1 t2)
2937 not used hint:
2938 duplication hint:
2939 error hint:
2940
2941           QUERY PLAN          
2942 ------------------------------
2943  Hash Full Join
2944    Hash Cond: (t1.id = t2.id)
2945    ->  Seq Scan on t1
2946    ->  Hash
2947          ->  Seq Scan on t2
2948 (5 rows)
2949
2950 -- inherite table test
2951 SET constraint_exclusion TO off;
2952 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
2953                                  QUERY PLAN                                  
2954 -----------------------------------------------------------------------------
2955  Result
2956    ->  Append
2957          ->  Seq Scan on p1
2958                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
2959          ->  Seq Scan on p1_c1 p1
2960                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
2961          ->  Seq Scan on p1_c2 p1
2962                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
2963          ->  Seq Scan on p1_c3 p1
2964                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
2965          ->  Tid Scan on p1_c4 p1
2966                TID Cond: (ctid = '(1,1)'::tid)
2967                Filter: ((id >= 50) AND (id <= 51))
2968          ->  Tid Scan on p1_c1_c1 p1
2969                TID Cond: (ctid = '(1,1)'::tid)
2970                Filter: ((id >= 50) AND (id <= 51))
2971          ->  Tid Scan on p1_c1_c2 p1
2972                TID Cond: (ctid = '(1,1)'::tid)
2973                Filter: ((id >= 50) AND (id <= 51))
2974          ->  Tid Scan on p1_c3_c1 p1
2975                TID Cond: (ctid = '(1,1)'::tid)
2976                Filter: ((id >= 50) AND (id <= 51))
2977          ->  Tid Scan on p1_c3_c2 p1
2978                TID Cond: (ctid = '(1,1)'::tid)
2979                Filter: ((id >= 50) AND (id <= 51))
2980 (25 rows)
2981
2982 SET constraint_exclusion TO on;
2983 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
2984                                  QUERY PLAN                                  
2985 -----------------------------------------------------------------------------
2986  Result
2987    ->  Append
2988          ->  Seq Scan on p1
2989                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
2990          ->  Seq Scan on p1_c1 p1
2991                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
2992          ->  Tid Scan on p1_c1_c1 p1
2993                TID Cond: (ctid = '(1,1)'::tid)
2994                Filter: ((id >= 50) AND (id <= 51))
2995          ->  Tid Scan on p1_c1_c2 p1
2996                TID Cond: (ctid = '(1,1)'::tid)
2997                Filter: ((id >= 50) AND (id <= 51))
2998 (12 rows)
2999
3000 SET constraint_exclusion TO off;
3001 /*+SeqScan(p1)*/
3002 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3003 LOG:  pg_hint_plan:
3004 used hint:
3005 SeqScan(p1)
3006 not used hint:
3007 duplication hint:
3008 error hint:
3009
3010                                  QUERY PLAN                                  
3011 -----------------------------------------------------------------------------
3012  Result
3013    ->  Append
3014          ->  Seq Scan on p1
3015                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3016          ->  Seq Scan on p1_c1 p1
3017                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3018          ->  Seq Scan on p1_c2 p1
3019                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3020          ->  Seq Scan on p1_c3 p1
3021                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3022          ->  Seq Scan on p1_c4 p1
3023                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3024          ->  Seq Scan on p1_c1_c1 p1
3025                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3026          ->  Seq Scan on p1_c1_c2 p1
3027                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3028          ->  Seq Scan on p1_c3_c1 p1
3029                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3030          ->  Seq Scan on p1_c3_c2 p1
3031                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3032 (20 rows)
3033
3034 /*+IndexScan(p1)*/
3035 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3036 LOG:  pg_hint_plan:
3037 used hint:
3038 IndexScan(p1)
3039 not used hint:
3040 duplication hint:
3041 error hint:
3042
3043                         QUERY PLAN                         
3044 -----------------------------------------------------------
3045  Result
3046    ->  Append
3047          ->  Index Scan using p1_pkey on p1
3048                Index Cond: ((id >= 50) AND (id <= 51))
3049                Filter: (ctid = '(1,1)'::tid)
3050          ->  Index Scan using p1_c1_pkey on p1_c1 p1
3051                Index Cond: ((id >= 50) AND (id <= 51))
3052                Filter: (ctid = '(1,1)'::tid)
3053          ->  Index Scan using p1_c2_pkey on p1_c2 p1
3054                Index Cond: ((id >= 50) AND (id <= 51))
3055                Filter: (ctid = '(1,1)'::tid)
3056          ->  Index Scan using p1_c3_pkey on p1_c3 p1
3057                Index Cond: ((id >= 50) AND (id <= 51))
3058                Filter: (ctid = '(1,1)'::tid)
3059          ->  Index Scan using p1_c4_pkey on p1_c4 p1
3060                Index Cond: ((id >= 50) AND (id <= 51))
3061                Filter: (ctid = '(1,1)'::tid)
3062          ->  Index Scan using p1_c1_c1_pkey on p1_c1_c1 p1
3063                Index Cond: ((id >= 50) AND (id <= 51))
3064                Filter: (ctid = '(1,1)'::tid)
3065          ->  Index Scan using p1_c1_c2_pkey on p1_c1_c2 p1
3066                Index Cond: ((id >= 50) AND (id <= 51))
3067                Filter: (ctid = '(1,1)'::tid)
3068          ->  Index Scan using p1_c3_c1_pkey on p1_c3_c1 p1
3069                Index Cond: ((id >= 50) AND (id <= 51))
3070                Filter: (ctid = '(1,1)'::tid)
3071          ->  Index Scan using p1_c3_c2_pkey on p1_c3_c2 p1
3072                Index Cond: ((id >= 50) AND (id <= 51))
3073                Filter: (ctid = '(1,1)'::tid)
3074 (29 rows)
3075
3076 /*+BitmapScan(p1)*/
3077 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3078 LOG:  pg_hint_plan:
3079 used hint:
3080 BitmapScan(p1)
3081 not used hint:
3082 duplication hint:
3083 error hint:
3084
3085                          QUERY PLAN                          
3086 -------------------------------------------------------------
3087  Result
3088    ->  Append
3089          ->  Bitmap Heap Scan on p1
3090                Recheck Cond: ((id >= 50) AND (id <= 51))
3091                Filter: (ctid = '(1,1)'::tid)
3092                ->  Bitmap Index Scan on p1_pkey
3093                      Index Cond: ((id >= 50) AND (id <= 51))
3094          ->  Bitmap Heap Scan on p1_c1 p1
3095                Recheck Cond: ((id >= 50) AND (id <= 51))
3096                Filter: (ctid = '(1,1)'::tid)
3097                ->  Bitmap Index Scan on p1_c1_pkey
3098                      Index Cond: ((id >= 50) AND (id <= 51))
3099          ->  Bitmap Heap Scan on p1_c2 p1
3100                Recheck Cond: ((id >= 50) AND (id <= 51))
3101                Filter: (ctid = '(1,1)'::tid)
3102                ->  Bitmap Index Scan on p1_c2_pkey
3103                      Index Cond: ((id >= 50) AND (id <= 51))
3104          ->  Bitmap Heap Scan on p1_c3 p1
3105                Recheck Cond: ((id >= 50) AND (id <= 51))
3106                Filter: (ctid = '(1,1)'::tid)
3107                ->  Bitmap Index Scan on p1_c3_pkey
3108                      Index Cond: ((id >= 50) AND (id <= 51))
3109          ->  Bitmap Heap Scan on p1_c4 p1
3110                Recheck Cond: ((id >= 50) AND (id <= 51))
3111                Filter: (ctid = '(1,1)'::tid)
3112                ->  Bitmap Index Scan on p1_c4_pkey
3113                      Index Cond: ((id >= 50) AND (id <= 51))
3114          ->  Bitmap Heap Scan on p1_c1_c1 p1
3115                Recheck Cond: ((id >= 50) AND (id <= 51))
3116                Filter: (ctid = '(1,1)'::tid)
3117                ->  Bitmap Index Scan on p1_c1_c1_pkey
3118                      Index Cond: ((id >= 50) AND (id <= 51))
3119          ->  Bitmap Heap Scan on p1_c1_c2 p1
3120                Recheck Cond: ((id >= 50) AND (id <= 51))
3121                Filter: (ctid = '(1,1)'::tid)
3122                ->  Bitmap Index Scan on p1_c1_c2_pkey
3123                      Index Cond: ((id >= 50) AND (id <= 51))
3124          ->  Bitmap Heap Scan on p1_c3_c1 p1
3125                Recheck Cond: ((id >= 50) AND (id <= 51))
3126                Filter: (ctid = '(1,1)'::tid)
3127                ->  Bitmap Index Scan on p1_c3_c1_pkey
3128                      Index Cond: ((id >= 50) AND (id <= 51))
3129          ->  Bitmap Heap Scan on p1_c3_c2 p1
3130                Recheck Cond: ((id >= 50) AND (id <= 51))
3131                Filter: (ctid = '(1,1)'::tid)
3132                ->  Bitmap Index Scan on p1_c3_c2_pkey
3133                      Index Cond: ((id >= 50) AND (id <= 51))
3134 (47 rows)
3135
3136 /*+TidScan(p1)*/
3137 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3138 LOG:  pg_hint_plan:
3139 used hint:
3140 TidScan(p1)
3141 not used hint:
3142 duplication hint:
3143 error hint:
3144
3145                     QUERY PLAN                     
3146 ---------------------------------------------------
3147  Result
3148    ->  Append
3149          ->  Tid Scan on p1
3150                TID Cond: (ctid = '(1,1)'::tid)
3151                Filter: ((id >= 50) AND (id <= 51))
3152          ->  Tid Scan on p1_c1 p1
3153                TID Cond: (ctid = '(1,1)'::tid)
3154                Filter: ((id >= 50) AND (id <= 51))
3155          ->  Tid Scan on p1_c2 p1
3156                TID Cond: (ctid = '(1,1)'::tid)
3157                Filter: ((id >= 50) AND (id <= 51))
3158          ->  Tid Scan on p1_c3 p1
3159                TID Cond: (ctid = '(1,1)'::tid)
3160                Filter: ((id >= 50) AND (id <= 51))
3161          ->  Tid Scan on p1_c4 p1
3162                TID Cond: (ctid = '(1,1)'::tid)
3163                Filter: ((id >= 50) AND (id <= 51))
3164          ->  Tid Scan on p1_c1_c1 p1
3165                TID Cond: (ctid = '(1,1)'::tid)
3166                Filter: ((id >= 50) AND (id <= 51))
3167          ->  Tid Scan on p1_c1_c2 p1
3168                TID Cond: (ctid = '(1,1)'::tid)
3169                Filter: ((id >= 50) AND (id <= 51))
3170          ->  Tid Scan on p1_c3_c1 p1
3171                TID Cond: (ctid = '(1,1)'::tid)
3172                Filter: ((id >= 50) AND (id <= 51))
3173          ->  Tid Scan on p1_c3_c2 p1
3174                TID Cond: (ctid = '(1,1)'::tid)
3175                Filter: ((id >= 50) AND (id <= 51))
3176 (29 rows)
3177
3178 SET constraint_exclusion TO on;
3179 /*+SeqScan(p1)*/
3180 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3181 LOG:  pg_hint_plan:
3182 used hint:
3183 SeqScan(p1)
3184 not used hint:
3185 duplication hint:
3186 error hint:
3187
3188                                  QUERY PLAN                                  
3189 -----------------------------------------------------------------------------
3190  Result
3191    ->  Append
3192          ->  Seq Scan on p1
3193                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3194          ->  Seq Scan on p1_c1 p1
3195                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3196          ->  Seq Scan on p1_c1_c1 p1
3197                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3198          ->  Seq Scan on p1_c1_c2 p1
3199                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3200 (10 rows)
3201
3202 /*+IndexScan(p1)*/
3203 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3204 LOG:  pg_hint_plan:
3205 used hint:
3206 IndexScan(p1)
3207 not used hint:
3208 duplication hint:
3209 error hint:
3210
3211                         QUERY PLAN                         
3212 -----------------------------------------------------------
3213  Result
3214    ->  Append
3215          ->  Index Scan using p1_pkey on p1
3216                Index Cond: ((id >= 50) AND (id <= 51))
3217                Filter: (ctid = '(1,1)'::tid)
3218          ->  Index Scan using p1_c1_pkey on p1_c1 p1
3219                Index Cond: ((id >= 50) AND (id <= 51))
3220                Filter: (ctid = '(1,1)'::tid)
3221          ->  Index Scan using p1_c1_c1_pkey on p1_c1_c1 p1
3222                Index Cond: ((id >= 50) AND (id <= 51))
3223                Filter: (ctid = '(1,1)'::tid)
3224          ->  Index Scan using p1_c1_c2_pkey on p1_c1_c2 p1
3225                Index Cond: ((id >= 50) AND (id <= 51))
3226                Filter: (ctid = '(1,1)'::tid)
3227 (14 rows)
3228
3229 /*+BitmapScan(p1)*/
3230 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3231 LOG:  pg_hint_plan:
3232 used hint:
3233 BitmapScan(p1)
3234 not used hint:
3235 duplication hint:
3236 error hint:
3237
3238                          QUERY PLAN                          
3239 -------------------------------------------------------------
3240  Result
3241    ->  Append
3242          ->  Bitmap Heap Scan on p1
3243                Recheck Cond: ((id >= 50) AND (id <= 51))
3244                Filter: (ctid = '(1,1)'::tid)
3245                ->  Bitmap Index Scan on p1_pkey
3246                      Index Cond: ((id >= 50) AND (id <= 51))
3247          ->  Bitmap Heap Scan on p1_c1 p1
3248                Recheck Cond: ((id >= 50) AND (id <= 51))
3249                Filter: (ctid = '(1,1)'::tid)
3250                ->  Bitmap Index Scan on p1_c1_pkey
3251                      Index Cond: ((id >= 50) AND (id <= 51))
3252          ->  Bitmap Heap Scan on p1_c1_c1 p1
3253                Recheck Cond: ((id >= 50) AND (id <= 51))
3254                Filter: (ctid = '(1,1)'::tid)
3255                ->  Bitmap Index Scan on p1_c1_c1_pkey
3256                      Index Cond: ((id >= 50) AND (id <= 51))
3257          ->  Bitmap Heap Scan on p1_c1_c2 p1
3258                Recheck Cond: ((id >= 50) AND (id <= 51))
3259                Filter: (ctid = '(1,1)'::tid)
3260                ->  Bitmap Index Scan on p1_c1_c2_pkey
3261                      Index Cond: ((id >= 50) AND (id <= 51))
3262 (22 rows)
3263
3264 /*+TidScan(p1)*/
3265 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3266 LOG:  pg_hint_plan:
3267 used hint:
3268 TidScan(p1)
3269 not used hint:
3270 duplication hint:
3271 error hint:
3272
3273                     QUERY PLAN                     
3274 ---------------------------------------------------
3275  Result
3276    ->  Append
3277          ->  Tid Scan on p1
3278                TID Cond: (ctid = '(1,1)'::tid)
3279                Filter: ((id >= 50) AND (id <= 51))
3280          ->  Tid Scan on p1_c1 p1
3281                TID Cond: (ctid = '(1,1)'::tid)
3282                Filter: ((id >= 50) AND (id <= 51))
3283          ->  Tid Scan on p1_c1_c1 p1
3284                TID Cond: (ctid = '(1,1)'::tid)
3285                Filter: ((id >= 50) AND (id <= 51))
3286          ->  Tid Scan on p1_c1_c2 p1
3287                TID Cond: (ctid = '(1,1)'::tid)
3288                Filter: ((id >= 50) AND (id <= 51))
3289 (14 rows)
3290
3291 SET constraint_exclusion TO off;
3292 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3293                                     QUERY PLAN                                     
3294 -----------------------------------------------------------------------------------
3295  Merge Join
3296    Merge Cond: (public.p1.id = t1.id)
3297    ->  Sort
3298          Sort Key: public.p1.id
3299          ->  Append
3300                ->  Seq Scan on p1
3301                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3302                ->  Seq Scan on p1_c1 p1
3303                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3304                ->  Seq Scan on p1_c2 p1
3305                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3306                ->  Seq Scan on p1_c3 p1
3307                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3308                ->  Tid Scan on p1_c4 p1
3309                      TID Cond: (ctid = '(1,1)'::tid)
3310                      Filter: ((id >= 50) AND (id <= 51))
3311                ->  Tid Scan on p1_c1_c1 p1
3312                      TID Cond: (ctid = '(1,1)'::tid)
3313                      Filter: ((id >= 50) AND (id <= 51))
3314                ->  Tid Scan on p1_c1_c2 p1
3315                      TID Cond: (ctid = '(1,1)'::tid)
3316                      Filter: ((id >= 50) AND (id <= 51))
3317                ->  Tid Scan on p1_c3_c1 p1
3318                      TID Cond: (ctid = '(1,1)'::tid)
3319                      Filter: ((id >= 50) AND (id <= 51))
3320                ->  Tid Scan on p1_c3_c2 p1
3321                      TID Cond: (ctid = '(1,1)'::tid)
3322                      Filter: ((id >= 50) AND (id <= 51))
3323    ->  Index Scan using t1_pkey on t1
3324          Index Cond: (id < 10)
3325 (30 rows)
3326
3327 SET constraint_exclusion TO on;
3328 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3329                                     QUERY PLAN                                     
3330 -----------------------------------------------------------------------------------
3331  Merge Join
3332    Merge Cond: (public.p1.id = t1.id)
3333    ->  Sort
3334          Sort Key: public.p1.id
3335          ->  Append
3336                ->  Seq Scan on p1
3337                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3338                ->  Seq Scan on p1_c1 p1
3339                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3340                ->  Tid Scan on p1_c1_c1 p1
3341                      TID Cond: (ctid = '(1,1)'::tid)
3342                      Filter: ((id >= 50) AND (id <= 51))
3343                ->  Tid Scan on p1_c1_c2 p1
3344                      TID Cond: (ctid = '(1,1)'::tid)
3345                      Filter: ((id >= 50) AND (id <= 51))
3346    ->  Index Scan using t1_pkey on t1
3347          Index Cond: (id < 10)
3348 (17 rows)
3349
3350 SET constraint_exclusion TO off;
3351 /*+SeqScan(p1)*/
3352 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3353 LOG:  pg_hint_plan:
3354 used hint:
3355 SeqScan(p1)
3356 not used hint:
3357 duplication hint:
3358 error hint:
3359
3360                                     QUERY PLAN                                     
3361 -----------------------------------------------------------------------------------
3362  Merge Join
3363    Merge Cond: (public.p1.id = t1.id)
3364    ->  Sort
3365          Sort Key: public.p1.id
3366          ->  Append
3367                ->  Seq Scan on p1
3368                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3369                ->  Seq Scan on p1_c1 p1
3370                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3371                ->  Seq Scan on p1_c2 p1
3372                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3373                ->  Seq Scan on p1_c3 p1
3374                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3375                ->  Seq Scan on p1_c4 p1
3376                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3377                ->  Seq Scan on p1_c1_c1 p1
3378                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3379                ->  Seq Scan on p1_c1_c2 p1
3380                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3381                ->  Seq Scan on p1_c3_c1 p1
3382                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3383                ->  Seq Scan on p1_c3_c2 p1
3384                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3385    ->  Index Scan using t1_pkey on t1
3386          Index Cond: (id < 10)
3387 (25 rows)
3388
3389 /*+IndexScan(p1)*/
3390 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3391 LOG:  pg_hint_plan:
3392 used hint:
3393 IndexScan(p1)
3394 not used hint:
3395 duplication hint:
3396 error hint:
3397
3398                         QUERY PLAN                         
3399 -----------------------------------------------------------
3400  Merge Join
3401    Merge Cond: (public.p1.id = t1.id)
3402    ->  Merge Append
3403          Sort Key: public.p1.id
3404          ->  Index Scan using p1_pkey on p1
3405                Index Cond: ((id >= 50) AND (id <= 51))
3406                Filter: (ctid = '(1,1)'::tid)
3407          ->  Index Scan using p1_c1_pkey on p1_c1 p1
3408                Index Cond: ((id >= 50) AND (id <= 51))
3409                Filter: (ctid = '(1,1)'::tid)
3410          ->  Index Scan using p1_c2_pkey on p1_c2 p1
3411                Index Cond: ((id >= 50) AND (id <= 51))
3412                Filter: (ctid = '(1,1)'::tid)
3413          ->  Index Scan using p1_c3_pkey on p1_c3 p1
3414                Index Cond: ((id >= 50) AND (id <= 51))
3415                Filter: (ctid = '(1,1)'::tid)
3416          ->  Index Scan using p1_c4_pkey on p1_c4 p1
3417                Index Cond: ((id >= 50) AND (id <= 51))
3418                Filter: (ctid = '(1,1)'::tid)
3419          ->  Index Scan using p1_c1_c1_pkey on p1_c1_c1 p1
3420                Index Cond: ((id >= 50) AND (id <= 51))
3421                Filter: (ctid = '(1,1)'::tid)
3422          ->  Index Scan using p1_c1_c2_pkey on p1_c1_c2 p1
3423                Index Cond: ((id >= 50) AND (id <= 51))
3424                Filter: (ctid = '(1,1)'::tid)
3425          ->  Index Scan using p1_c3_c1_pkey on p1_c3_c1 p1
3426                Index Cond: ((id >= 50) AND (id <= 51))
3427                Filter: (ctid = '(1,1)'::tid)
3428          ->  Index Scan using p1_c3_c2_pkey on p1_c3_c2 p1
3429                Index Cond: ((id >= 50) AND (id <= 51))
3430                Filter: (ctid = '(1,1)'::tid)
3431    ->  Index Scan using t1_pkey on t1
3432          Index Cond: (id < 10)
3433 (33 rows)
3434
3435 /*+BitmapScan(p1)*/
3436 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3437 LOG:  pg_hint_plan:
3438 used hint:
3439 BitmapScan(p1)
3440 not used hint:
3441 duplication hint:
3442 error hint:
3443
3444                             QUERY PLAN                             
3445 -------------------------------------------------------------------
3446  Merge Join
3447    Merge Cond: (public.p1.id = t1.id)
3448    ->  Sort
3449          Sort Key: public.p1.id
3450          ->  Append
3451                ->  Bitmap Heap Scan on p1
3452                      Recheck Cond: ((id >= 50) AND (id <= 51))
3453                      Filter: (ctid = '(1,1)'::tid)
3454                      ->  Bitmap Index Scan on p1_pkey
3455                            Index Cond: ((id >= 50) AND (id <= 51))
3456                ->  Bitmap Heap Scan on p1_c1 p1
3457                      Recheck Cond: ((id >= 50) AND (id <= 51))
3458                      Filter: (ctid = '(1,1)'::tid)
3459                      ->  Bitmap Index Scan on p1_c1_pkey
3460                            Index Cond: ((id >= 50) AND (id <= 51))
3461                ->  Bitmap Heap Scan on p1_c2 p1
3462                      Recheck Cond: ((id >= 50) AND (id <= 51))
3463                      Filter: (ctid = '(1,1)'::tid)
3464                      ->  Bitmap Index Scan on p1_c2_pkey
3465                            Index Cond: ((id >= 50) AND (id <= 51))
3466                ->  Bitmap Heap Scan on p1_c3 p1
3467                      Recheck Cond: ((id >= 50) AND (id <= 51))
3468                      Filter: (ctid = '(1,1)'::tid)
3469                      ->  Bitmap Index Scan on p1_c3_pkey
3470                            Index Cond: ((id >= 50) AND (id <= 51))
3471                ->  Bitmap Heap Scan on p1_c4 p1
3472                      Recheck Cond: ((id >= 50) AND (id <= 51))
3473                      Filter: (ctid = '(1,1)'::tid)
3474                      ->  Bitmap Index Scan on p1_c4_pkey
3475                            Index Cond: ((id >= 50) AND (id <= 51))
3476                ->  Bitmap Heap Scan on p1_c1_c1 p1
3477                      Recheck Cond: ((id >= 50) AND (id <= 51))
3478                      Filter: (ctid = '(1,1)'::tid)
3479                      ->  Bitmap Index Scan on p1_c1_c1_pkey
3480                            Index Cond: ((id >= 50) AND (id <= 51))
3481                ->  Bitmap Heap Scan on p1_c1_c2 p1
3482                      Recheck Cond: ((id >= 50) AND (id <= 51))
3483                      Filter: (ctid = '(1,1)'::tid)
3484                      ->  Bitmap Index Scan on p1_c1_c2_pkey
3485                            Index Cond: ((id >= 50) AND (id <= 51))
3486                ->  Bitmap Heap Scan on p1_c3_c1 p1
3487                      Recheck Cond: ((id >= 50) AND (id <= 51))
3488                      Filter: (ctid = '(1,1)'::tid)
3489                      ->  Bitmap Index Scan on p1_c3_c1_pkey
3490                            Index Cond: ((id >= 50) AND (id <= 51))
3491                ->  Bitmap Heap Scan on p1_c3_c2 p1
3492                      Recheck Cond: ((id >= 50) AND (id <= 51))
3493                      Filter: (ctid = '(1,1)'::tid)
3494                      ->  Bitmap Index Scan on p1_c3_c2_pkey
3495                            Index Cond: ((id >= 50) AND (id <= 51))
3496    ->  Index Scan using t1_pkey on t1
3497          Index Cond: (id < 10)
3498 (52 rows)
3499
3500 /*+TidScan(p1)*/
3501 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3502 LOG:  pg_hint_plan:
3503 used hint:
3504 TidScan(p1)
3505 not used hint:
3506 duplication hint:
3507 error hint:
3508
3509                        QUERY PLAN                        
3510 ---------------------------------------------------------
3511  Merge Join
3512    Merge Cond: (public.p1.id = t1.id)
3513    ->  Sort
3514          Sort Key: public.p1.id
3515          ->  Append
3516                ->  Tid Scan on p1
3517                      TID Cond: (ctid = '(1,1)'::tid)
3518                      Filter: ((id >= 50) AND (id <= 51))
3519                ->  Tid Scan on p1_c1 p1
3520                      TID Cond: (ctid = '(1,1)'::tid)
3521                      Filter: ((id >= 50) AND (id <= 51))
3522                ->  Tid Scan on p1_c2 p1
3523                      TID Cond: (ctid = '(1,1)'::tid)
3524                      Filter: ((id >= 50) AND (id <= 51))
3525                ->  Tid Scan on p1_c3 p1
3526                      TID Cond: (ctid = '(1,1)'::tid)
3527                      Filter: ((id >= 50) AND (id <= 51))
3528                ->  Tid Scan on p1_c4 p1
3529                      TID Cond: (ctid = '(1,1)'::tid)
3530                      Filter: ((id >= 50) AND (id <= 51))
3531                ->  Tid Scan on p1_c1_c1 p1
3532                      TID Cond: (ctid = '(1,1)'::tid)
3533                      Filter: ((id >= 50) AND (id <= 51))
3534                ->  Tid Scan on p1_c1_c2 p1
3535                      TID Cond: (ctid = '(1,1)'::tid)
3536                      Filter: ((id >= 50) AND (id <= 51))
3537                ->  Tid Scan on p1_c3_c1 p1
3538                      TID Cond: (ctid = '(1,1)'::tid)
3539                      Filter: ((id >= 50) AND (id <= 51))
3540                ->  Tid Scan on p1_c3_c2 p1
3541                      TID Cond: (ctid = '(1,1)'::tid)
3542                      Filter: ((id >= 50) AND (id <= 51))
3543    ->  Index Scan using t1_pkey on t1
3544          Index Cond: (id < 10)
3545 (34 rows)
3546
3547 /*+NestLoop(p1 t1)*/
3548 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3549 LOG:  pg_hint_plan:
3550 used hint:
3551 NestLoop(p1 t1)
3552 not used hint:
3553 duplication hint:
3554 error hint:
3555
3556                                  QUERY PLAN                                  
3557 -----------------------------------------------------------------------------
3558  Nested Loop
3559    Join Filter: (public.p1.id = t1.id)
3560    ->  Append
3561          ->  Seq Scan on p1
3562                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3563          ->  Seq Scan on p1_c1 p1
3564                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3565          ->  Seq Scan on p1_c2 p1
3566                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3567          ->  Seq Scan on p1_c3 p1
3568                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3569          ->  Tid Scan on p1_c4 p1
3570                TID Cond: (ctid = '(1,1)'::tid)
3571                Filter: ((id >= 50) AND (id <= 51))
3572          ->  Tid Scan on p1_c1_c1 p1
3573                TID Cond: (ctid = '(1,1)'::tid)
3574                Filter: ((id >= 50) AND (id <= 51))
3575          ->  Tid Scan on p1_c1_c2 p1
3576                TID Cond: (ctid = '(1,1)'::tid)
3577                Filter: ((id >= 50) AND (id <= 51))
3578          ->  Tid Scan on p1_c3_c1 p1
3579                TID Cond: (ctid = '(1,1)'::tid)
3580                Filter: ((id >= 50) AND (id <= 51))
3581          ->  Tid Scan on p1_c3_c2 p1
3582                TID Cond: (ctid = '(1,1)'::tid)
3583                Filter: ((id >= 50) AND (id <= 51))
3584    ->  Materialize
3585          ->  Index Scan using t1_pkey on t1
3586                Index Cond: (id < 10)
3587 (29 rows)
3588
3589 /*+MergeJoin(p1 t1)*/
3590 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3591 LOG:  pg_hint_plan:
3592 used hint:
3593 MergeJoin(p1 t1)
3594 not used hint:
3595 duplication hint:
3596 error hint:
3597
3598                                     QUERY PLAN                                     
3599 -----------------------------------------------------------------------------------
3600  Merge Join
3601    Merge Cond: (public.p1.id = t1.id)
3602    ->  Sort
3603          Sort Key: public.p1.id
3604          ->  Append
3605                ->  Seq Scan on p1
3606                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3607                ->  Seq Scan on p1_c1 p1
3608                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3609                ->  Seq Scan on p1_c2 p1
3610                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3611                ->  Seq Scan on p1_c3 p1
3612                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3613                ->  Tid Scan on p1_c4 p1
3614                      TID Cond: (ctid = '(1,1)'::tid)
3615                      Filter: ((id >= 50) AND (id <= 51))
3616                ->  Tid Scan on p1_c1_c1 p1
3617                      TID Cond: (ctid = '(1,1)'::tid)
3618                      Filter: ((id >= 50) AND (id <= 51))
3619                ->  Tid Scan on p1_c1_c2 p1
3620                      TID Cond: (ctid = '(1,1)'::tid)
3621                      Filter: ((id >= 50) AND (id <= 51))
3622                ->  Tid Scan on p1_c3_c1 p1
3623                      TID Cond: (ctid = '(1,1)'::tid)
3624                      Filter: ((id >= 50) AND (id <= 51))
3625                ->  Tid Scan on p1_c3_c2 p1
3626                      TID Cond: (ctid = '(1,1)'::tid)
3627                      Filter: ((id >= 50) AND (id <= 51))
3628    ->  Index Scan using t1_pkey on t1
3629          Index Cond: (id < 10)
3630 (30 rows)
3631
3632 /*+HashJoin(p1 t1)*/
3633 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3634 LOG:  pg_hint_plan:
3635 used hint:
3636 HashJoin(p1 t1)
3637 not used hint:
3638 duplication hint:
3639 error hint:
3640
3641                                  QUERY PLAN                                  
3642 -----------------------------------------------------------------------------
3643  Hash Join
3644    Hash Cond: (public.p1.id = t1.id)
3645    ->  Append
3646          ->  Seq Scan on p1
3647                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3648          ->  Seq Scan on p1_c1 p1
3649                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3650          ->  Seq Scan on p1_c2 p1
3651                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3652          ->  Seq Scan on p1_c3 p1
3653                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3654          ->  Tid Scan on p1_c4 p1
3655                TID Cond: (ctid = '(1,1)'::tid)
3656                Filter: ((id >= 50) AND (id <= 51))
3657          ->  Tid Scan on p1_c1_c1 p1
3658                TID Cond: (ctid = '(1,1)'::tid)
3659                Filter: ((id >= 50) AND (id <= 51))
3660          ->  Tid Scan on p1_c1_c2 p1
3661                TID Cond: (ctid = '(1,1)'::tid)
3662                Filter: ((id >= 50) AND (id <= 51))
3663          ->  Tid Scan on p1_c3_c1 p1
3664                TID Cond: (ctid = '(1,1)'::tid)
3665                Filter: ((id >= 50) AND (id <= 51))
3666          ->  Tid Scan on p1_c3_c2 p1
3667                TID Cond: (ctid = '(1,1)'::tid)
3668                Filter: ((id >= 50) AND (id <= 51))
3669    ->  Hash
3670          ->  Index Scan using t1_pkey on t1
3671                Index Cond: (id < 10)
3672 (29 rows)
3673
3674 SET constraint_exclusion TO on;
3675 /*+SeqScan(p1)*/
3676 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3677 LOG:  pg_hint_plan:
3678 used hint:
3679 SeqScan(p1)
3680 not used hint:
3681 duplication hint:
3682 error hint:
3683
3684                                     QUERY PLAN                                     
3685 -----------------------------------------------------------------------------------
3686  Merge Join
3687    Merge Cond: (public.p1.id = t1.id)
3688    ->  Sort
3689          Sort Key: public.p1.id
3690          ->  Append
3691                ->  Seq Scan on p1
3692                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3693                ->  Seq Scan on p1_c1 p1
3694                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3695                ->  Seq Scan on p1_c1_c1 p1
3696                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3697                ->  Seq Scan on p1_c1_c2 p1
3698                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3699    ->  Index Scan using t1_pkey on t1
3700          Index Cond: (id < 10)
3701 (15 rows)
3702
3703 /*+IndexScan(p1)*/
3704 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3705 LOG:  pg_hint_plan:
3706 used hint:
3707 IndexScan(p1)
3708 not used hint:
3709 duplication hint:
3710 error hint:
3711
3712                         QUERY PLAN                         
3713 -----------------------------------------------------------
3714  Merge Join
3715    Merge Cond: (public.p1.id = t1.id)
3716    ->  Merge Append
3717          Sort Key: public.p1.id
3718          ->  Index Scan using p1_pkey on p1
3719                Index Cond: ((id >= 50) AND (id <= 51))
3720                Filter: (ctid = '(1,1)'::tid)
3721          ->  Index Scan using p1_c1_pkey on p1_c1 p1
3722                Index Cond: ((id >= 50) AND (id <= 51))
3723                Filter: (ctid = '(1,1)'::tid)
3724          ->  Index Scan using p1_c1_c1_pkey on p1_c1_c1 p1
3725                Index Cond: ((id >= 50) AND (id <= 51))
3726                Filter: (ctid = '(1,1)'::tid)
3727          ->  Index Scan using p1_c1_c2_pkey on p1_c1_c2 p1
3728                Index Cond: ((id >= 50) AND (id <= 51))
3729                Filter: (ctid = '(1,1)'::tid)
3730    ->  Index Scan using t1_pkey on t1
3731          Index Cond: (id < 10)
3732 (18 rows)
3733
3734 /*+BitmapScan(p1)*/
3735 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3736 LOG:  pg_hint_plan:
3737 used hint:
3738 BitmapScan(p1)
3739 not used hint:
3740 duplication hint:
3741 error hint:
3742
3743                             QUERY PLAN                             
3744 -------------------------------------------------------------------
3745  Merge Join
3746    Merge Cond: (public.p1.id = t1.id)
3747    ->  Sort
3748          Sort Key: public.p1.id
3749          ->  Append
3750                ->  Bitmap Heap Scan on p1
3751                      Recheck Cond: ((id >= 50) AND (id <= 51))
3752                      Filter: (ctid = '(1,1)'::tid)
3753                      ->  Bitmap Index Scan on p1_pkey
3754                            Index Cond: ((id >= 50) AND (id <= 51))
3755                ->  Bitmap Heap Scan on p1_c1 p1
3756                      Recheck Cond: ((id >= 50) AND (id <= 51))
3757                      Filter: (ctid = '(1,1)'::tid)
3758                      ->  Bitmap Index Scan on p1_c1_pkey
3759                            Index Cond: ((id >= 50) AND (id <= 51))
3760                ->  Bitmap Heap Scan on p1_c1_c1 p1
3761                      Recheck Cond: ((id >= 50) AND (id <= 51))
3762                      Filter: (ctid = '(1,1)'::tid)
3763                      ->  Bitmap Index Scan on p1_c1_c1_pkey
3764                            Index Cond: ((id >= 50) AND (id <= 51))
3765                ->  Bitmap Heap Scan on p1_c1_c2 p1
3766                      Recheck Cond: ((id >= 50) AND (id <= 51))
3767                      Filter: (ctid = '(1,1)'::tid)
3768                      ->  Bitmap Index Scan on p1_c1_c2_pkey
3769                            Index Cond: ((id >= 50) AND (id <= 51))
3770    ->  Index Scan using t1_pkey on t1
3771          Index Cond: (id < 10)
3772 (27 rows)
3773
3774 /*+TidScan(p1)*/
3775 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3776 LOG:  pg_hint_plan:
3777 used hint:
3778 TidScan(p1)
3779 not used hint:
3780 duplication hint:
3781 error hint:
3782
3783                        QUERY PLAN                        
3784 ---------------------------------------------------------
3785  Merge Join
3786    Merge Cond: (public.p1.id = t1.id)
3787    ->  Sort
3788          Sort Key: public.p1.id
3789          ->  Append
3790                ->  Tid Scan on p1
3791                      TID Cond: (ctid = '(1,1)'::tid)
3792                      Filter: ((id >= 50) AND (id <= 51))
3793                ->  Tid Scan on p1_c1 p1
3794                      TID Cond: (ctid = '(1,1)'::tid)
3795                      Filter: ((id >= 50) AND (id <= 51))
3796                ->  Tid Scan on p1_c1_c1 p1
3797                      TID Cond: (ctid = '(1,1)'::tid)
3798                      Filter: ((id >= 50) AND (id <= 51))
3799                ->  Tid Scan on p1_c1_c2 p1
3800                      TID Cond: (ctid = '(1,1)'::tid)
3801                      Filter: ((id >= 50) AND (id <= 51))
3802    ->  Index Scan using t1_pkey on t1
3803          Index Cond: (id < 10)
3804 (19 rows)
3805
3806 /*+NestLoop(p1 t1)*/
3807 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3808 LOG:  pg_hint_plan:
3809 used hint:
3810 NestLoop(p1 t1)
3811 not used hint:
3812 duplication hint:
3813 error hint:
3814
3815                                     QUERY PLAN                                     
3816 -----------------------------------------------------------------------------------
3817  Nested Loop
3818    Join Filter: (public.p1.id = t1.id)
3819    ->  Index Scan using t1_pkey on t1
3820          Index Cond: (id < 10)
3821    ->  Materialize
3822          ->  Append
3823                ->  Seq Scan on p1
3824                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3825                ->  Seq Scan on p1_c1 p1
3826                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3827                ->  Tid Scan on p1_c1_c1 p1
3828                      TID Cond: (ctid = '(1,1)'::tid)
3829                      Filter: ((id >= 50) AND (id <= 51))
3830                ->  Tid Scan on p1_c1_c2 p1
3831                      TID Cond: (ctid = '(1,1)'::tid)
3832                      Filter: ((id >= 50) AND (id <= 51))
3833 (16 rows)
3834
3835 /*+MergeJoin(p1 t1)*/
3836 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3837 LOG:  pg_hint_plan:
3838 used hint:
3839 MergeJoin(p1 t1)
3840 not used hint:
3841 duplication hint:
3842 error hint:
3843
3844                                     QUERY PLAN                                     
3845 -----------------------------------------------------------------------------------
3846  Merge Join
3847    Merge Cond: (public.p1.id = t1.id)
3848    ->  Sort
3849          Sort Key: public.p1.id
3850          ->  Append
3851                ->  Seq Scan on p1
3852                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3853                ->  Seq Scan on p1_c1 p1
3854                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3855                ->  Tid Scan on p1_c1_c1 p1
3856                      TID Cond: (ctid = '(1,1)'::tid)
3857                      Filter: ((id >= 50) AND (id <= 51))
3858                ->  Tid Scan on p1_c1_c2 p1
3859                      TID Cond: (ctid = '(1,1)'::tid)
3860                      Filter: ((id >= 50) AND (id <= 51))
3861    ->  Index Scan using t1_pkey on t1
3862          Index Cond: (id < 10)
3863 (17 rows)
3864
3865 /*+HashJoin(p1 t1)*/
3866 EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3867 LOG:  pg_hint_plan:
3868 used hint:
3869 HashJoin(p1 t1)
3870 not used hint:
3871 duplication hint:
3872 error hint:
3873
3874                                     QUERY PLAN                                     
3875 -----------------------------------------------------------------------------------
3876  Hash Join
3877    Hash Cond: (t1.id = public.p1.id)
3878    ->  Index Scan using t1_pkey on t1
3879          Index Cond: (id < 10)
3880    ->  Hash
3881          ->  Append
3882                ->  Seq Scan on p1
3883                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3884                ->  Seq Scan on p1_c1 p1
3885                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3886                ->  Tid Scan on p1_c1_c1 p1
3887                      TID Cond: (ctid = '(1,1)'::tid)
3888                      Filter: ((id >= 50) AND (id <= 51))
3889                ->  Tid Scan on p1_c1_c2 p1
3890                      TID Cond: (ctid = '(1,1)'::tid)
3891                      Filter: ((id >= 50) AND (id <= 51))
3892 (16 rows)
3893
3894 SET constraint_exclusion TO off;
3895 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3896                            QUERY PLAN                            
3897 -----------------------------------------------------------------
3898  Seq Scan on p1
3899    Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3900 (2 rows)
3901
3902 SET constraint_exclusion TO on;
3903 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3904                            QUERY PLAN                            
3905 -----------------------------------------------------------------
3906  Seq Scan on p1
3907    Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3908 (2 rows)
3909
3910 SET constraint_exclusion TO off;
3911 /*+SeqScan(p1)*/
3912 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3913 LOG:  pg_hint_plan:
3914 used hint:
3915 SeqScan(p1)
3916 not used hint:
3917 duplication hint:
3918 error hint:
3919
3920                            QUERY PLAN                            
3921 -----------------------------------------------------------------
3922  Seq Scan on p1
3923    Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3924 (2 rows)
3925
3926 /*+IndexScan(p1)*/
3927 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3928 LOG:  pg_hint_plan:
3929 used hint:
3930 IndexScan(p1)
3931 not used hint:
3932 duplication hint:
3933 error hint:
3934
3935                 QUERY PLAN                 
3936 -------------------------------------------
3937  Index Scan using p1_pkey on p1
3938    Index Cond: ((id >= 50) AND (id <= 51))
3939    Filter: (ctid = '(1,1)'::tid)
3940 (3 rows)
3941
3942 /*+BitmapScan(p1)*/
3943 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3944 LOG:  pg_hint_plan:
3945 used hint:
3946 BitmapScan(p1)
3947 not used hint:
3948 duplication hint:
3949 error hint:
3950
3951                    QUERY PLAN                    
3952 -------------------------------------------------
3953  Bitmap Heap Scan on p1
3954    Recheck Cond: ((id >= 50) AND (id <= 51))
3955    Filter: (ctid = '(1,1)'::tid)
3956    ->  Bitmap Index Scan on p1_pkey
3957          Index Cond: ((id >= 50) AND (id <= 51))
3958 (5 rows)
3959
3960 /*+TidScan(p1)*/
3961 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3962 LOG:  pg_hint_plan:
3963 used hint:
3964 TidScan(p1)
3965 not used hint:
3966 duplication hint:
3967 error hint:
3968
3969               QUERY PLAN               
3970 ---------------------------------------
3971  Tid Scan on p1
3972    TID Cond: (ctid = '(1,1)'::tid)
3973    Filter: ((id >= 50) AND (id <= 51))
3974 (3 rows)
3975
3976 /*+NestLoop(p1 t1)*/
3977 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3978 LOG:  pg_hint_plan:
3979 used hint:
3980 NestLoop(p1 t1)
3981 not used hint:
3982 duplication hint:
3983 error hint:
3984
3985                               QUERY PLAN                               
3986 -----------------------------------------------------------------------
3987  Nested Loop
3988    ->  Seq Scan on p1
3989          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3990    ->  Index Scan using t1_pkey on t1
3991          Index Cond: ((id < 10) AND (id = p1.id))
3992 (5 rows)
3993
3994 /*+MergeJoin(p1 t1)*/
3995 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3996 LOG:  pg_hint_plan:
3997 used hint:
3998 MergeJoin(p1 t1)
3999 not used hint:
4000 duplication hint:
4001 error hint:
4002
4003                                  QUERY PLAN                                  
4004 -----------------------------------------------------------------------------
4005  Merge Join
4006    Merge Cond: (p1.id = t1.id)
4007    ->  Sort
4008          Sort Key: p1.id
4009          ->  Seq Scan on p1
4010                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4011    ->  Index Scan using t1_pkey on t1
4012          Index Cond: (id < 10)
4013 (8 rows)
4014
4015 /*+HashJoin(p1 t1)*/
4016 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4017 LOG:  pg_hint_plan:
4018 used hint:
4019 HashJoin(p1 t1)
4020 not used hint:
4021 duplication hint:
4022 error hint:
4023
4024                                  QUERY PLAN                                  
4025 -----------------------------------------------------------------------------
4026  Hash Join
4027    Hash Cond: (t1.id = p1.id)
4028    ->  Index Scan using t1_pkey on t1
4029          Index Cond: (id < 10)
4030    ->  Hash
4031          ->  Seq Scan on p1
4032                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4033 (7 rows)
4034
4035 SET constraint_exclusion TO on;
4036 /*+SeqScan(p1)*/
4037 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4038 LOG:  pg_hint_plan:
4039 used hint:
4040 SeqScan(p1)
4041 not used hint:
4042 duplication hint:
4043 error hint:
4044
4045                            QUERY PLAN                            
4046 -----------------------------------------------------------------
4047  Seq Scan on p1
4048    Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4049 (2 rows)
4050
4051 /*+IndexScan(p1)*/
4052 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4053 LOG:  pg_hint_plan:
4054 used hint:
4055 IndexScan(p1)
4056 not used hint:
4057 duplication hint:
4058 error hint:
4059
4060                 QUERY PLAN                 
4061 -------------------------------------------
4062  Index Scan using p1_pkey on p1
4063    Index Cond: ((id >= 50) AND (id <= 51))
4064    Filter: (ctid = '(1,1)'::tid)
4065 (3 rows)
4066
4067 /*+BitmapScan(p1)*/
4068 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4069 LOG:  pg_hint_plan:
4070 used hint:
4071 BitmapScan(p1)
4072 not used hint:
4073 duplication hint:
4074 error hint:
4075
4076                    QUERY PLAN                    
4077 -------------------------------------------------
4078  Bitmap Heap Scan on p1
4079    Recheck Cond: ((id >= 50) AND (id <= 51))
4080    Filter: (ctid = '(1,1)'::tid)
4081    ->  Bitmap Index Scan on p1_pkey
4082          Index Cond: ((id >= 50) AND (id <= 51))
4083 (5 rows)
4084
4085 /*+TidScan(p1)*/
4086 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4087 LOG:  pg_hint_plan:
4088 used hint:
4089 TidScan(p1)
4090 not used hint:
4091 duplication hint:
4092 error hint:
4093
4094               QUERY PLAN               
4095 ---------------------------------------
4096  Tid Scan on p1
4097    TID Cond: (ctid = '(1,1)'::tid)
4098    Filter: ((id >= 50) AND (id <= 51))
4099 (3 rows)
4100
4101 /*+NestLoop(p1 t1)*/
4102 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4103 LOG:  pg_hint_plan:
4104 used hint:
4105 NestLoop(p1 t1)
4106 not used hint:
4107 duplication hint:
4108 error hint:
4109
4110                               QUERY PLAN                               
4111 -----------------------------------------------------------------------
4112  Nested Loop
4113    ->  Seq Scan on p1
4114          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4115    ->  Index Scan using t1_pkey on t1
4116          Index Cond: ((id < 10) AND (id = p1.id))
4117 (5 rows)
4118
4119 /*+MergeJoin(p1 t1)*/
4120 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4121 LOG:  pg_hint_plan:
4122 used hint:
4123 MergeJoin(p1 t1)
4124 not used hint:
4125 duplication hint:
4126 error hint:
4127
4128                                  QUERY PLAN                                  
4129 -----------------------------------------------------------------------------
4130  Merge Join
4131    Merge Cond: (p1.id = t1.id)
4132    ->  Sort
4133          Sort Key: p1.id
4134          ->  Seq Scan on p1
4135                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4136    ->  Index Scan using t1_pkey on t1
4137          Index Cond: (id < 10)
4138 (8 rows)
4139
4140 /*+HashJoin(p1 t1)*/
4141 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4142 LOG:  pg_hint_plan:
4143 used hint:
4144 HashJoin(p1 t1)
4145 not used hint:
4146 duplication hint:
4147 error hint:
4148
4149                                  QUERY PLAN                                  
4150 -----------------------------------------------------------------------------
4151  Hash Join
4152    Hash Cond: (t1.id = p1.id)
4153    ->  Index Scan using t1_pkey on t1
4154          Index Cond: (id < 10)
4155    ->  Hash
4156          ->  Seq Scan on p1
4157                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4158 (7 rows)
4159
4160 SET constraint_exclusion TO off;
4161 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4162                               QUERY PLAN                               
4163 -----------------------------------------------------------------------
4164  Nested Loop
4165    ->  Seq Scan on p1
4166          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4167    ->  Index Scan using t1_pkey on t1
4168          Index Cond: ((id < 10) AND (id = p1.id))
4169 (5 rows)
4170
4171 SET constraint_exclusion TO on;
4172 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4173                               QUERY PLAN                               
4174 -----------------------------------------------------------------------
4175  Nested Loop
4176    ->  Seq Scan on p1
4177          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4178    ->  Index Scan using t1_pkey on t1
4179          Index Cond: ((id < 10) AND (id = p1.id))
4180 (5 rows)
4181
4182 SET constraint_exclusion TO off;
4183 /*+SeqScan(p1)*/
4184 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4185 LOG:  pg_hint_plan:
4186 used hint:
4187 SeqScan(p1)
4188 not used hint:
4189 duplication hint:
4190 error hint:
4191
4192                               QUERY PLAN                               
4193 -----------------------------------------------------------------------
4194  Nested Loop
4195    ->  Seq Scan on p1
4196          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4197    ->  Index Scan using t1_pkey on t1
4198          Index Cond: ((id < 10) AND (id = p1.id))
4199 (5 rows)
4200
4201 /*+IndexScan(p1)*/
4202 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4203 LOG:  pg_hint_plan:
4204 used hint:
4205 IndexScan(p1)
4206 not used hint:
4207 duplication hint:
4208 error hint:
4209
4210                     QUERY PLAN                    
4211 --------------------------------------------------
4212  Nested Loop
4213    ->  Index Scan using p1_pkey on p1
4214          Index Cond: ((id >= 50) AND (id <= 51))
4215          Filter: (ctid = '(1,1)'::tid)
4216    ->  Index Scan using t1_pkey on t1
4217          Index Cond: ((id < 10) AND (id = p1.id))
4218 (6 rows)
4219
4220 /*+BitmapScan(p1)*/
4221 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4222 LOG:  pg_hint_plan:
4223 used hint:
4224 BitmapScan(p1)
4225 not used hint:
4226 duplication hint:
4227 error hint:
4228
4229                       QUERY PLAN                       
4230 -------------------------------------------------------
4231  Nested Loop
4232    ->  Bitmap Heap Scan on p1
4233          Recheck Cond: ((id >= 50) AND (id <= 51))
4234          Filter: (ctid = '(1,1)'::tid)
4235          ->  Bitmap Index Scan on p1_pkey
4236                Index Cond: ((id >= 50) AND (id <= 51))
4237    ->  Index Scan using t1_pkey on t1
4238          Index Cond: ((id < 10) AND (id = p1.id))
4239 (8 rows)
4240
4241 /*+TidScan(p1)*/
4242 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4243 LOG:  pg_hint_plan:
4244 used hint:
4245 TidScan(p1)
4246 not used hint:
4247 duplication hint:
4248 error hint:
4249
4250                     QUERY PLAN                    
4251 --------------------------------------------------
4252  Nested Loop
4253    ->  Tid Scan on p1
4254          TID Cond: (ctid = '(1,1)'::tid)
4255          Filter: ((id >= 50) AND (id <= 51))
4256    ->  Index Scan using t1_pkey on t1
4257          Index Cond: ((id < 10) AND (id = p1.id))
4258 (6 rows)
4259
4260 SET constraint_exclusion TO on;
4261 /*+SeqScan(p1)*/
4262 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4263 LOG:  pg_hint_plan:
4264 used hint:
4265 SeqScan(p1)
4266 not used hint:
4267 duplication hint:
4268 error hint:
4269
4270                               QUERY PLAN                               
4271 -----------------------------------------------------------------------
4272  Nested Loop
4273    ->  Seq Scan on p1
4274          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4275    ->  Index Scan using t1_pkey on t1
4276          Index Cond: ((id < 10) AND (id = p1.id))
4277 (5 rows)
4278
4279 /*+IndexScan(p1)*/
4280 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4281 LOG:  pg_hint_plan:
4282 used hint:
4283 IndexScan(p1)
4284 not used hint:
4285 duplication hint:
4286 error hint:
4287
4288                     QUERY PLAN                    
4289 --------------------------------------------------
4290  Nested Loop
4291    ->  Index Scan using p1_pkey on p1
4292          Index Cond: ((id >= 50) AND (id <= 51))
4293          Filter: (ctid = '(1,1)'::tid)
4294    ->  Index Scan using t1_pkey on t1
4295          Index Cond: ((id < 10) AND (id = p1.id))
4296 (6 rows)
4297
4298 /*+BitmapScan(p1)*/
4299 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4300 LOG:  pg_hint_plan:
4301 used hint:
4302 BitmapScan(p1)
4303 not used hint:
4304 duplication hint:
4305 error hint:
4306
4307                       QUERY PLAN                       
4308 -------------------------------------------------------
4309  Nested Loop
4310    ->  Bitmap Heap Scan on p1
4311          Recheck Cond: ((id >= 50) AND (id <= 51))
4312          Filter: (ctid = '(1,1)'::tid)
4313          ->  Bitmap Index Scan on p1_pkey
4314                Index Cond: ((id >= 50) AND (id <= 51))
4315    ->  Index Scan using t1_pkey on t1
4316          Index Cond: ((id < 10) AND (id = p1.id))
4317 (8 rows)
4318
4319 /*+TidScan(p1)*/
4320 EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4321 LOG:  pg_hint_plan:
4322 used hint:
4323 TidScan(p1)
4324 not used hint:
4325 duplication hint:
4326 error hint:
4327
4328                     QUERY PLAN                    
4329 --------------------------------------------------
4330  Nested Loop
4331    ->  Tid Scan on p1
4332          TID Cond: (ctid = '(1,1)'::tid)
4333          Filter: ((id >= 50) AND (id <= 51))
4334    ->  Index Scan using t1_pkey on t1
4335          Index Cond: ((id < 10) AND (id = p1.id))
4336 (6 rows)
4337
4338 -- quote test
4339 /*+SeqScan("""t1 )      ")IndexScan("t  2 """)HashJoin("""t1 )  "T3"t   2 """)Leading("""t1 )   "T3"t   2 """)Set(application_name"a    a       a""     a       A")*/
4340 EXPLAIN (COSTS false) SELECT * FROM t1 """t1 )  ", t2 "t        2 """, t3 "T3" WHERE """t1 )    ".id = "t       2 """.id AND """t1 )    ".id = "T3".id;
4341 LOG:  pg_hint_plan:
4342 used hint:
4343 SeqScan("""t1 ) ")
4344 IndexScan("t    2 """)
4345 HashJoin("""t1 )        " T3 "t 2 """)
4346 Leading("""t1 ) " T3 "t 2 """)
4347 Set(application_name "a a       a""     a       A")
4348 not used hint:
4349 duplication hint:
4350 error hint:
4351
4352                        QUERY PLAN                        
4353 ---------------------------------------------------------
4354  Hash Join
4355    Hash Cond: ("t        2 """.id = """t1 )      ".id)
4356    ->  Index Scan using t2_pkey on t2 "t 2 """
4357    ->  Hash
4358          ->  Hash Join
4359                Hash Cond: ("""t1 )       ".id = "T3".id)
4360                ->  Seq Scan on t1 """t1 )        "
4361                ->  Hash
4362                      ->  Seq Scan on t3 "T3"
4363 (9 rows)
4364
4365 -- duplicate hint test
4366 /*+SeqScan(t1)SeqScan(t2)IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)*/
4367 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
4368 INFO:  hint syntax error at or near "SeqScan(t1)SeqScan(t2)IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4369 DETAIL:  Conflict scan method hint.
4370 INFO:  hint syntax error at or near "IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4371 DETAIL:  Conflict scan method hint.
4372 INFO:  hint syntax error at or near "BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4373 DETAIL:  Conflict scan method hint.
4374 INFO:  hint syntax error at or near "SeqScan(t2)IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4375 DETAIL:  Conflict scan method hint.
4376 INFO:  hint syntax error at or near "IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4377 DETAIL:  Conflict scan method hint.
4378 INFO:  hint syntax error at or near "BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4379 DETAIL:  Conflict scan method hint.
4380 INFO:  hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4381 DETAIL:  Conflict join method hint.
4382 INFO:  hint syntax error at or near "NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4383 DETAIL:  Conflict join method hint.
4384 INFO:  hint syntax error at or near "Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4385 DETAIL:  Conflict leading hint.
4386 INFO:  hint syntax error at or near "Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4387 DETAIL:  Conflict set hint.
4388 LOG:  pg_hint_plan:
4389 used hint:
4390 TidScan(t1)
4391 TidScan(t2)
4392 MergeJoin(t1 t2)
4393 Leading(t2 t1)
4394 Set(enable_mergejoin on)
4395 Set(enable_seqscan on)
4396 not used hint:
4397 duplication hint:
4398 SeqScan(t1)
4399 IndexScan(t1)
4400 BitmapScan(t1)
4401 SeqScan(t2)
4402 IndexScan(t2)
4403 BitmapScan(t2)
4404 HashJoin(t1 t2)
4405 NestLoop(t1 t2)
4406 Leading(t1 t2)
4407 Set(enable_seqscan off)
4408 error hint:
4409
4410                   QUERY PLAN                   
4411 -----------------------------------------------
4412  Merge Join
4413    Merge Cond: (t1.id = t2.id)
4414    ->  Sort
4415          Sort Key: t1.id
4416          ->  Tid Scan on t1
4417                TID Cond: (ctid = '(1,1)'::tid)
4418    ->  Sort
4419          Sort Key: t2.id
4420          ->  Tid Scan on t2
4421                TID Cond: (ctid = '(1,1)'::tid)
4422 (10 rows)
4423
4424 -- sub query Leading hint test
4425 SET from_collapse_limit TO 100;
4426 SET geqo_threshold TO 100;
4427 EXPLAIN (COSTS false)
4428 WITH c1_1(id) AS (
4429 SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4430 )
4431 SELECT t1_1.id, (
4432 SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4433 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4434 SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4435 ) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4436 SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id 
4437 );
4438                                QUERY PLAN                                
4439 -------------------------------------------------------------------------
4440  Nested Loop
4441    CTE c1_1
4442      ->  Aggregate
4443            ->  Merge Join
4444                  Merge Cond: (t1_5.id = t3_5.id)
4445                  ->  Merge Join
4446                        Merge Cond: (t1_5.id = t2_5.id)
4447                        ->  Index Scan using t1_pkey on t1 t1_5
4448                        ->  Index Scan using t2_pkey on t2 t2_5
4449                  ->  Sort
4450                        Sort Key: t3_5.id
4451                        ->  Seq Scan on t3 t3_5
4452    InitPlan 2 (returns $1)
4453      ->  Aggregate
4454            ->  Merge Join
4455                  Merge Cond: (t1_2.id = t3_2.id)
4456                  ->  Merge Join
4457                        Merge Cond: (t1_2.id = t2_2.id)
4458                        ->  Index Scan using t1_pkey on t1 t1_2
4459                        ->  Index Scan using t2_pkey on t2 t2_2
4460                  ->  Sort
4461                        Sort Key: t3_2.id
4462                        ->  Seq Scan on t3 t3_2
4463    InitPlan 3 (returns $2)
4464      ->  Aggregate
4465            ->  Merge Join
4466                  Merge Cond: (t1_4.id = t3_4.id)
4467                  ->  Merge Join
4468                        Merge Cond: (t1_4.id = t2_4.id)
4469                        ->  Index Scan using t1_pkey on t1 t1_4
4470                        ->  Index Scan using t2_pkey on t2 t2_4
4471                  ->  Sort
4472                        Sort Key: t3_4.id
4473                        ->  Seq Scan on t3 t3_4
4474    ->  Nested Loop
4475          ->  Nested Loop
4476                ->  Nested Loop
4477                      ->  Nested Loop
4478                            ->  Nested Loop
4479                                  ->  Index Scan using t1_pkey on t1 t1_1
4480                                        Index Cond: (id = $2)
4481                                  ->  Seq Scan on t3 t3_1
4482                                        Filter: (id = $2)
4483                            ->  Index Scan using t2_pkey on t2 t2_1
4484                                  Index Cond: (id = $2)
4485                      ->  Index Scan using t1_pkey on t1 t1_3
4486                            Index Cond: (id = $2)
4487                ->  Index Scan using t2_pkey on t2 t2_3
4488                      Index Cond: (id = $2)
4489          ->  Seq Scan on t3 t3_3
4490                Filter: (id = $2)
4491    ->  CTE Scan on c1_1
4492          Filter: (id = $2)
4493 (53 rows)
4494
4495 /*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)*/
4496 EXPLAIN (COSTS false)
4497 WITH c1_1(id) AS (
4498 SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4499 )
4500 SELECT t1_1.id, (
4501 SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4502 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4503 SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4504 ) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4505 SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id 
4506 );
4507 LOG:  pg_hint_plan:
4508 used hint:
4509 HashJoin(t1_1 t3_1)
4510 NestLoop(t1_2 t2_2)
4511 MergeJoin(t1_3 t3_3)
4512 NestLoop(t1_4 t2_4)
4513 NestLoop(t1_5 t2_5)
4514 not used hint:
4515 duplication hint:
4516 error hint:
4517
4518                                QUERY PLAN                                
4519 -------------------------------------------------------------------------
4520  Nested Loop
4521    CTE c1_1
4522      ->  Aggregate
4523            ->  Merge Join
4524                  Merge Cond: (t1_5.id = t3_5.id)
4525                  ->  Nested Loop
4526                        ->  Index Scan using t2_pkey on t2 t2_5
4527                        ->  Index Scan using t1_pkey on t1 t1_5
4528                              Index Cond: (id = t2_5.id)
4529                  ->  Sort
4530                        Sort Key: t3_5.id
4531                        ->  Seq Scan on t3 t3_5
4532    InitPlan 2 (returns $2)
4533      ->  Aggregate
4534            ->  Merge Join
4535                  Merge Cond: (t1_2.id = t3_2.id)
4536                  ->  Nested Loop
4537                        ->  Index Scan using t2_pkey on t2 t2_2
4538                        ->  Index Scan using t1_pkey on t1 t1_2
4539                              Index Cond: (id = t2_2.id)
4540                  ->  Sort
4541                        Sort Key: t3_2.id
4542                        ->  Seq Scan on t3 t3_2
4543    InitPlan 3 (returns $3)
4544      ->  Aggregate
4545            ->  Merge Join
4546                  Merge Cond: (t1_4.id = t3_4.id)
4547                  ->  Nested Loop
4548                        ->  Index Scan using t2_pkey on t2 t2_4
4549                        ->  Index Scan using t1_pkey on t1 t1_4
4550                              Index Cond: (id = t2_4.id)
4551                  ->  Sort
4552                        Sort Key: t3_4.id
4553                        ->  Seq Scan on t3 t3_4
4554    ->  Nested Loop
4555          ->  Nested Loop
4556                ->  Nested Loop
4557                      ->  Nested Loop
4558                            ->  Nested Loop
4559                                  ->  Index Scan using t2_pkey on t2 t2_1
4560                                        Index Cond: (id = $3)
4561                                  ->  Seq Scan on t3 t3_1
4562                                        Filter: (id = $3)
4563                            ->  Index Scan using t1_pkey on t1 t1_1
4564                                  Index Cond: (id = $3)
4565                      ->  Index Scan using t1_pkey on t1 t1_3
4566                            Index Cond: (id = $3)
4567                ->  Index Scan using t2_pkey on t2 t2_3
4568                      Index Cond: (id = $3)
4569          ->  Seq Scan on t3 t3_3
4570                Filter: (id = $3)
4571    ->  CTE Scan on c1_1
4572          Filter: (id = $3)
4573 (53 rows)
4574
4575 /*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)Leading(a t1_1 t1_2 t1_4 t1_5)*/
4576 EXPLAIN (COSTS false)
4577 WITH c1_1(id) AS (
4578 SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4579 )
4580 SELECT t1_1.id, (
4581 SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4582 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4583 SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4584 ) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4585 SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id 
4586 );
4587 LOG:  pg_hint_plan:
4588 used hint:
4589 HashJoin(t1_1 t3_1)
4590 NestLoop(t1_2 t2_2)
4591 MergeJoin(t1_3 t3_3)
4592 NestLoop(t1_4 t2_4)
4593 NestLoop(t1_5 t2_5)
4594 not used hint:
4595 Leading(a t1_1 t1_2 t1_4 t1_5)
4596 duplication hint:
4597 error hint:
4598
4599                                QUERY PLAN                                
4600 -------------------------------------------------------------------------
4601  Nested Loop
4602    CTE c1_1
4603      ->  Aggregate
4604            ->  Merge Join
4605                  Merge Cond: (t1_5.id = t3_5.id)
4606                  ->  Nested Loop
4607                        ->  Index Scan using t2_pkey on t2 t2_5
4608                        ->  Index Scan using t1_pkey on t1 t1_5
4609                              Index Cond: (id = t2_5.id)
4610                  ->  Sort
4611                        Sort Key: t3_5.id
4612                        ->  Seq Scan on t3 t3_5
4613    InitPlan 2 (returns $2)
4614      ->  Aggregate
4615            ->  Merge Join
4616                  Merge Cond: (t1_2.id = t3_2.id)
4617                  ->  Nested Loop
4618                        ->  Index Scan using t2_pkey on t2 t2_2
4619                        ->  Index Scan using t1_pkey on t1 t1_2
4620                              Index Cond: (id = t2_2.id)
4621                  ->  Sort
4622                        Sort Key: t3_2.id
4623                        ->  Seq Scan on t3 t3_2
4624    InitPlan 3 (returns $3)
4625      ->  Aggregate
4626            ->  Merge Join
4627                  Merge Cond: (t1_4.id = t3_4.id)
4628                  ->  Nested Loop
4629                        ->  Index Scan using t2_pkey on t2 t2_4
4630                        ->  Index Scan using t1_pkey on t1 t1_4
4631                              Index Cond: (id = t2_4.id)
4632                  ->  Sort
4633                        Sort Key: t3_4.id
4634                        ->  Seq Scan on t3 t3_4
4635    ->  Nested Loop
4636          ->  Nested Loop
4637                ->  Nested Loop
4638                      ->  Nested Loop
4639                            ->  Nested Loop
4640                                  ->  Index Scan using t2_pkey on t2 t2_1
4641                                        Index Cond: (id = $3)
4642                                  ->  Seq Scan on t3 t3_1
4643                                        Filter: (id = $3)
4644                            ->  Index Scan using t1_pkey on t1 t1_1
4645                                  Index Cond: (id = $3)
4646                      ->  Index Scan using t1_pkey on t1 t1_3
4647                            Index Cond: (id = $3)
4648                ->  Index Scan using t2_pkey on t2 t2_3
4649                      Index Cond: (id = $3)
4650          ->  Seq Scan on t3 t3_3
4651                Filter: (id = $3)
4652    ->  CTE Scan on c1_1
4653          Filter: (id = $3)
4654 (53 rows)
4655
4656 /*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)Leading(a t3_2 t3_5 t2_2 c1_1 t3_4 t3_3 t2_3 t2_4 t1_3 t2_5 t1_2 t3_1 t1_4 t2_1 t1_5 t1_1)*/
4657 EXPLAIN (COSTS false)
4658 WITH c1_1(id) AS (
4659 SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4660 )
4661 SELECT t1_1.id, (
4662 SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4663 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4664 SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4665 ) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4666 SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id 
4667 );
4668 LOG:  pg_hint_plan:
4669 used hint:
4670 Leading(a t3_2 t3_5 t2_2 c1_1 t3_4 t3_3 t2_3 t2_4 t1_3 t2_5 t1_2 t3_1 t1_4 t2_1 t1_5 t1_1)
4671 not used hint:
4672 HashJoin(t1_1 t3_1)
4673 NestLoop(t1_2 t2_2)
4674 MergeJoin(t1_3 t3_3)
4675 NestLoop(t1_4 t2_4)
4676 NestLoop(t1_5 t2_5)
4677 duplication hint:
4678 error hint:
4679
4680                             QUERY PLAN                             
4681 -------------------------------------------------------------------
4682  Nested Loop
4683    CTE c1_1
4684      ->  Aggregate
4685            ->  Merge Join
4686                  Merge Cond: (t2_5.id = t1_5.id)
4687                  ->  Merge Join
4688                        Merge Cond: (t2_5.id = t3_5.id)
4689                        ->  Index Scan using t2_pkey on t2 t2_5
4690                        ->  Sort
4691                              Sort Key: t3_5.id
4692                              ->  Seq Scan on t3 t3_5
4693                  ->  Index Scan using t1_pkey on t1 t1_5
4694    InitPlan 2 (returns $1)
4695      ->  Aggregate
4696            ->  Merge Join
4697                  Merge Cond: (t2_2.id = t1_2.id)
4698                  ->  Merge Join
4699                        Merge Cond: (t2_2.id = t3_2.id)
4700                        ->  Index Scan using t2_pkey on t2 t2_2
4701                        ->  Sort
4702                              Sort Key: t3_2.id
4703                              ->  Seq Scan on t3 t3_2
4704                  ->  Index Scan using t1_pkey on t1 t1_2
4705    InitPlan 3 (returns $2)
4706      ->  Aggregate
4707            ->  Merge Join
4708                  Merge Cond: (t2_4.id = t1_4.id)
4709                  ->  Merge Join
4710                        Merge Cond: (t2_4.id = t3_4.id)
4711                        ->  Index Scan using t2_pkey on t2 t2_4
4712                        ->  Sort
4713                              Sort Key: t3_4.id
4714                              ->  Seq Scan on t3 t3_4
4715                  ->  Index Scan using t1_pkey on t1 t1_4
4716    ->  Nested Loop
4717          ->  Nested Loop
4718                ->  Nested Loop
4719                      ->  Nested Loop
4720                            ->  Nested Loop
4721                                  ->  Seq Scan on t3 t3_3
4722                                        Filter: (id = $2)
4723                                  ->  CTE Scan on c1_1
4724                                        Filter: (id = $2)
4725                            ->  Index Scan using t2_pkey on t2 t2_3
4726                                  Index Cond: (id = $2)
4727                      ->  Index Scan using t1_pkey on t1 t1_3
4728                            Index Cond: (id = $2)
4729                ->  Seq Scan on t3 t3_1
4730                      Filter: (id = $2)
4731          ->  Index Scan using t2_pkey on t2 t2_1
4732                Index Cond: (id = $2)
4733    ->  Index Scan using t1_pkey on t1 t1_1
4734          Index Cond: (id = $2)
4735 (53 rows)
4736
4737 SET from_collapse_limit TO 1;
4738 EXPLAIN (COSTS false)
4739 WITH c1_1(id) AS (
4740 SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4741 )
4742 SELECT t1_1.id, (
4743 SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4744 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4745 SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4746 ) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4747 SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id 
4748 );
4749                           QUERY PLAN                           
4750 ---------------------------------------------------------------
4751  Nested Loop
4752    CTE c1_1
4753      ->  Aggregate
4754            ->  Merge Join
4755                  Merge Cond: (t1_5.id = t3_5.id)
4756                  ->  Merge Join
4757                        Merge Cond: (t1_5.id = t2_5.id)
4758                        ->  Index Scan using t1_pkey on t1 t1_5
4759                        ->  Index Scan using t2_pkey on t2 t2_5
4760                  ->  Sort
4761                        Sort Key: t3_5.id
4762                        ->  Seq Scan on t3 t3_5
4763    InitPlan 2 (returns $1)
4764      ->  Aggregate
4765            ->  Merge Join
4766                  Merge Cond: (t1_2.id = t3_2.id)
4767                  ->  Merge Join
4768                        Merge Cond: (t1_2.id = t2_2.id)
4769                        ->  Index Scan using t1_pkey on t1 t1_2
4770                        ->  Index Scan using t2_pkey on t2 t2_2
4771                  ->  Sort
4772                        Sort Key: t3_2.id
4773                        ->  Seq Scan on t3 t3_2
4774    InitPlan 3 (returns $2)
4775      ->  Aggregate
4776            ->  Merge Join
4777                  Merge Cond: (t1_4.id = t3_4.id)
4778                  ->  Merge Join
4779                        Merge Cond: (t1_4.id = t2_4.id)
4780                        ->  Index Scan using t1_pkey on t1 t1_4
4781                        ->  Index Scan using t2_pkey on t2 t2_4
4782                  ->  Sort
4783                        Sort Key: t3_4.id
4784                        ->  Seq Scan on t3 t3_4
4785    ->  Nested Loop
4786          ->  Nested Loop
4787                ->  Nested Loop
4788                      ->  Index Scan using t1_pkey on t1 t1_1
4789                            Index Cond: (id = $2)
4790                      ->  Seq Scan on t3 t3_1
4791                            Filter: (id = $2)
4792                ->  Index Scan using t2_pkey on t2 t2_1
4793                      Index Cond: (id = $2)
4794          ->  Nested Loop
4795                ->  Nested Loop
4796                      ->  Index Scan using t1_pkey on t1 t1_3
4797                            Index Cond: (id = $2)
4798                      ->  Seq Scan on t3 t3_3
4799                            Filter: (id = $2)
4800                ->  Index Scan using t2_pkey on t2 t2_3
4801                      Index Cond: (id = $2)
4802    ->  CTE Scan on c1_1
4803          Filter: (id = $2)
4804 (53 rows)
4805
4806 /*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)*/
4807 EXPLAIN (COSTS false)
4808 WITH c1_1(id) AS (
4809 SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4810 )
4811 SELECT t1_1.id, (
4812 SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4813 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4814 SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4815 ) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4816 SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id 
4817 );
4818 LOG:  pg_hint_plan:
4819 used hint:
4820 HashJoin(t1_1 t3_1)
4821 NestLoop(t1_2 t2_2)
4822 MergeJoin(t1_3 t3_3)
4823 NestLoop(t1_4 t2_4)
4824 NestLoop(t1_5 t2_5)
4825 not used hint:
4826 duplication hint:
4827 error hint:
4828
4829                           QUERY PLAN                           
4830 ---------------------------------------------------------------
4831  Nested Loop
4832    CTE c1_1
4833      ->  Aggregate
4834            ->  Merge Join
4835                  Merge Cond: (t1_5.id = t3_5.id)
4836                  ->  Nested Loop
4837                        ->  Index Scan using t2_pkey on t2 t2_5
4838                        ->  Index Scan using t1_pkey on t1 t1_5
4839                              Index Cond: (id = t2_5.id)
4840                  ->  Sort
4841                        Sort Key: t3_5.id
4842                        ->  Seq Scan on t3 t3_5
4843    InitPlan 2 (returns $2)
4844      ->  Aggregate
4845            ->  Merge Join
4846                  Merge Cond: (t1_2.id = t3_2.id)
4847                  ->  Nested Loop
4848                        ->  Index Scan using t2_pkey on t2 t2_2
4849                        ->  Index Scan using t1_pkey on t1 t1_2
4850                              Index Cond: (id = t2_2.id)
4851                  ->  Sort
4852                        Sort Key: t3_2.id
4853                        ->  Seq Scan on t3 t3_2
4854    InitPlan 3 (returns $3)
4855      ->  Aggregate
4856            ->  Merge Join
4857                  Merge Cond: (t1_4.id = t3_4.id)
4858                  ->  Nested Loop
4859                        ->  Index Scan using t2_pkey on t2 t2_4
4860                        ->  Index Scan using t1_pkey on t1 t1_4
4861                              Index Cond: (id = t2_4.id)
4862                  ->  Sort
4863                        Sort Key: t3_4.id
4864                        ->  Seq Scan on t3 t3_4
4865    ->  Nested Loop
4866          ->  Nested Loop
4867                ->  Nested Loop
4868                      ->  Index Scan using t2_pkey on t2 t2_1
4869                            Index Cond: (id = $3)
4870                      ->  Seq Scan on t3 t3_1
4871                            Filter: (id = $3)
4872                ->  Index Scan using t1_pkey on t1 t1_1
4873                      Index Cond: (id = $3)
4874          ->  Nested Loop
4875                ->  Nested Loop
4876                      ->  Index Scan using t2_pkey on t2 t2_3
4877                            Index Cond: (id = $3)
4878                      ->  Seq Scan on t3 t3_3
4879                            Filter: (id = $3)
4880                ->  Index Scan using t1_pkey on t1 t1_3
4881                      Index Cond: (id = $3)
4882    ->  CTE Scan on c1_1
4883          Filter: (id = $3)
4884 (53 rows)
4885
4886 /*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)Leading(a t1_1 t1_2 t1_4 t1_5)*/
4887 EXPLAIN (COSTS false)
4888 WITH c1_1(id) AS (
4889 SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4890 )
4891 SELECT t1_1.id, (
4892 SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4893 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4894 SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4895 ) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4896 SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id 
4897 );
4898 LOG:  pg_hint_plan:
4899 used hint:
4900 HashJoin(t1_1 t3_1)
4901 NestLoop(t1_2 t2_2)
4902 MergeJoin(t1_3 t3_3)
4903 NestLoop(t1_4 t2_4)
4904 NestLoop(t1_5 t2_5)
4905 not used hint:
4906 Leading(a t1_1 t1_2 t1_4 t1_5)
4907 duplication hint:
4908 error hint:
4909
4910                           QUERY PLAN                           
4911 ---------------------------------------------------------------
4912  Nested Loop
4913    CTE c1_1
4914      ->  Aggregate
4915            ->  Merge Join
4916                  Merge Cond: (t1_5.id = t3_5.id)
4917                  ->  Nested Loop
4918                        ->  Index Scan using t2_pkey on t2 t2_5
4919                        ->  Index Scan using t1_pkey on t1 t1_5
4920                              Index Cond: (id = t2_5.id)
4921                  ->  Sort
4922                        Sort Key: t3_5.id
4923                        ->  Seq Scan on t3 t3_5
4924    InitPlan 2 (returns $2)
4925      ->  Aggregate
4926            ->  Merge Join
4927                  Merge Cond: (t1_2.id = t3_2.id)
4928                  ->  Nested Loop
4929                        ->  Index Scan using t2_pkey on t2 t2_2
4930                        ->  Index Scan using t1_pkey on t1 t1_2
4931                              Index Cond: (id = t2_2.id)
4932                  ->  Sort
4933                        Sort Key: t3_2.id
4934                        ->  Seq Scan on t3 t3_2
4935    InitPlan 3 (returns $3)
4936      ->  Aggregate
4937            ->  Merge Join
4938                  Merge Cond: (t1_4.id = t3_4.id)
4939                  ->  Nested Loop
4940                        ->  Index Scan using t2_pkey on t2 t2_4
4941                        ->  Index Scan using t1_pkey on t1 t1_4
4942                              Index Cond: (id = t2_4.id)
4943                  ->  Sort
4944                        Sort Key: t3_4.id
4945                        ->  Seq Scan on t3 t3_4
4946    ->  Nested Loop
4947          ->  Nested Loop
4948                ->  Nested Loop
4949                      ->  Index Scan using t2_pkey on t2 t2_1
4950                            Index Cond: (id = $3)
4951                      ->  Seq Scan on t3 t3_1
4952                            Filter: (id = $3)
4953                ->  Index Scan using t1_pkey on t1 t1_1
4954                      Index Cond: (id = $3)
4955          ->  Nested Loop
4956                ->  Nested Loop
4957                      ->  Index Scan using t2_pkey on t2 t2_3
4958                            Index Cond: (id = $3)
4959                      ->  Seq Scan on t3 t3_3
4960                            Filter: (id = $3)
4961                ->  Index Scan using t1_pkey on t1 t1_3
4962                      Index Cond: (id = $3)
4963    ->  CTE Scan on c1_1
4964          Filter: (id = $3)
4965 (53 rows)
4966
4967 /*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)Leading(a t3_2 t3_5 t2_2 c1_1 t3_4 t3_3 t2_3 t2_4 t1_3 t2_5 t1_2 t3_1 t1_4 t2_1 t1_5 t1_1)*/
4968 EXPLAIN (COSTS false)
4969 WITH c1_1(id) AS (
4970 SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4971 )
4972 SELECT t1_1.id, (
4973 SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4974 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4975 SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4976 ) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4977 SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id 
4978 );
4979 LOG:  pg_hint_plan:
4980 used hint:
4981 Leading(a t3_2 t3_5 t2_2 c1_1 t3_4 t3_3 t2_3 t2_4 t1_3 t2_5 t1_2 t3_1 t1_4 t2_1 t1_5 t1_1)
4982 not used hint:
4983 HashJoin(t1_1 t3_1)
4984 NestLoop(t1_2 t2_2)
4985 MergeJoin(t1_3 t3_3)
4986 NestLoop(t1_4 t2_4)
4987 NestLoop(t1_5 t2_5)
4988 duplication hint:
4989 error hint:
4990
4991                                QUERY PLAN                                
4992 -------------------------------------------------------------------------
4993  Nested Loop
4994    CTE c1_1
4995      ->  Aggregate
4996            ->  Merge Join
4997                  Merge Cond: (t2_5.id = t1_5.id)
4998                  ->  Merge Join
4999                        Merge Cond: (t2_5.id = t3_5.id)
5000                        ->  Index Scan using t2_pkey on t2 t2_5
5001                        ->  Sort
5002                              Sort Key: t3_5.id
5003                              ->  Seq Scan on t3 t3_5
5004                  ->  Index Scan using t1_pkey on t1 t1_5
5005    InitPlan 2 (returns $1)
5006      ->  Aggregate
5007            ->  Merge Join
5008                  Merge Cond: (t2_2.id = t1_2.id)
5009                  ->  Merge Join
5010                        Merge Cond: (t2_2.id = t3_2.id)
5011                        ->  Index Scan using t2_pkey on t2 t2_2
5012                        ->  Sort
5013                              Sort Key: t3_2.id
5014                              ->  Seq Scan on t3 t3_2
5015                  ->  Index Scan using t1_pkey on t1 t1_2
5016    InitPlan 3 (returns $2)
5017      ->  Aggregate
5018            ->  Merge Join
5019                  Merge Cond: (t2_4.id = t1_4.id)
5020                  ->  Merge Join
5021                        Merge Cond: (t2_4.id = t3_4.id)
5022                        ->  Index Scan using t2_pkey on t2 t2_4
5023                        ->  Sort
5024                              Sort Key: t3_4.id
5025                              ->  Seq Scan on t3 t3_4
5026                  ->  Index Scan using t1_pkey on t1 t1_4
5027    ->  Nested Loop
5028          ->  Nested Loop
5029                ->  Nested Loop
5030                      ->  Nested Loop
5031                            ->  Nested Loop
5032                                  ->  Index Scan using t2_pkey on t2 t2_3
5033                                        Index Cond: (id = $2)
5034                                  ->  Seq Scan on t3 t3_3
5035                                        Filter: (id = $2)
5036                            ->  Index Scan using t1_pkey on t1 t1_3
5037                                  Index Cond: (id = $2)
5038                      ->  CTE Scan on c1_1
5039                            Filter: (id = $2)
5040                ->  Seq Scan on t3 t3_1
5041                      Filter: (id = $2)
5042          ->  Index Scan using t2_pkey on t2 t2_1
5043                Index Cond: (id = $2)
5044    ->  Index Scan using t1_pkey on t1 t1_1
5045          Index Cond: (id = $2)
5046 (53 rows)
5047
5048 EXPLAIN (COSTS false) SELECT * FROM t1, s1.t1, t2 WHERE public.t1.id = s1.t1.id AND public.t1.id = t2.id;
5049                   QUERY PLAN                   
5050 -----------------------------------------------
5051  Merge Join
5052    Merge Cond: (public.t1.id = t2.id)
5053    ->  Merge Join
5054          Merge Cond: (public.t1.id = s1.t1.id)
5055          ->  Index Scan using t1_pkey on t1
5056          ->  Index Scan using t1_pkey on t1
5057    ->  Index Scan using t2_pkey on t2
5058 (7 rows)
5059
5060 /*+NestLoop(t1 t2)*/
5061 EXPLAIN (COSTS false) SELECT * FROM t1, s1.t1, t2 WHERE public.t1.id = s1.t1.id AND public.t1.id = t2.id;
5062 INFO:  hint syntax error at or near "NestLoop(t1 t2)"
5063 DETAIL:  Relation name "t1" is ambiguous.
5064 ERROR:  negative bitmapset member not allowed