OSDN Git Service

LeadingHintから変換したJoinMethodHintについて格納する結合レベルを
[pghintplan/pg_hint_plan.git] / expected / pg_hint_plan-9.1.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:  Unrecognized hint keyword "Test".
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_hint 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_hint TO on;
67 /*Set(enable_indexscan off)*/
68 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
69               QUERY PLAN              
70 --------------------------------------
71  Merge Join
72    Merge Cond: (t1.id = t2.id)
73    ->  Index Scan using t1_pkey on t1
74    ->  Index Scan using t2_pkey on t2
75 (4 rows)
76
77 --+Set(enable_indexscan off)
78 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
79               QUERY PLAN              
80 --------------------------------------
81  Merge Join
82    Merge Cond: (t1.id = t2.id)
83    ->  Index Scan using t1_pkey on t1
84    ->  Index Scan using t2_pkey on t2
85 (4 rows)
86
87 /*+Set(enable_indexscan off) /* nest comment */ */
88 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
89 INFO:  hint syntax error at or near "/* nest comment */ */
90 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;"
91 DETAIL:  Nested block comments are not supported.
92               QUERY PLAN              
93 --------------------------------------
94  Merge Join
95    Merge Cond: (t1.id = t2.id)
96    ->  Index Scan using t1_pkey on t1
97    ->  Index Scan using t2_pkey on t2
98 (4 rows)
99
100 /*+Set(enable_indexscan off)*/
101 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
102 LOG:  pg_hint_plan:
103 used hint:
104 Set(enable_indexscan off)
105 not used hint:
106 duplication hint:
107 error hint:
108
109           QUERY PLAN          
110 ------------------------------
111  Hash Join
112    Hash Cond: (t1.id = t2.id)
113    ->  Seq Scan on t1
114    ->  Hash
115          ->  Seq Scan on t2
116 (5 rows)
117
118 /*+ Set(enable_indexscan off) Set(enable_hashjoin off) */
119 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
120 LOG:  pg_hint_plan:
121 used hint:
122 Set(enable_hashjoin off)
123 Set(enable_indexscan off)
124 not used hint:
125 duplication hint:
126 error hint:
127
128           QUERY PLAN           
129 -------------------------------
130  Merge Join
131    Merge Cond: (t1.id = t2.id)
132    ->  Sort
133          Sort Key: t1.id
134          ->  Seq Scan on t1
135    ->  Sort
136          Sort Key: t2.id
137          ->  Seq Scan on t2
138 (8 rows)
139
140 /*+      Set     (       enable_indexscan        off     )       */
141 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
142 LOG:  pg_hint_plan:
143 used hint:
144 Set(enable_indexscan off)
145 not used hint:
146 duplication hint:
147 error hint:
148
149           QUERY PLAN          
150 ------------------------------
151  Hash Join
152    Hash Cond: (t1.id = t2.id)
153    ->  Seq Scan on t1
154    ->  Hash
155          ->  Seq Scan on t2
156 (5 rows)
157
158 /*+      
159                 Set      
160                 (        
161                 enable_indexscan         
162                 off      
163                 )        
164                 */              
165 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
166 LOG:  pg_hint_plan:
167 used hint:
168 Set(enable_indexscan off)
169 not used hint:
170 duplication hint:
171 error hint:
172
173           QUERY PLAN          
174 ------------------------------
175  Hash Join
176    Hash Cond: (t1.id = t2.id)
177    ->  Seq Scan on t1
178    ->  Hash
179          ->  Seq Scan on t2
180 (5 rows)
181
182 /*+ Set(enable_indexscan off)Set(enable_nestloop off)Set(enable_mergejoin off)          
183                 Set(enable_seqscan off)
184                 */
185 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
186 LOG:  pg_hint_plan:
187 used hint:
188 Set(enable_indexscan off)
189 Set(enable_mergejoin off)
190 Set(enable_nestloop off)
191 Set(enable_seqscan off)
192 not used hint:
193 duplication hint:
194 error hint:
195
196                  QUERY PLAN                 
197 --------------------------------------------
198  Hash Join
199    Hash Cond: (t1.id = t2.id)
200    ->  Index Scan using t1_pkey on t1
201    ->  Hash
202          ->  Index Scan using t2_pkey on t2
203 (5 rows)
204
205 /*+Set(work_mem "1M")*/
206 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
207 INFO:  invalid value for parameter "work_mem": "1M"
208 HINT:  Valid units for this parameter are "kB", "MB", and "GB".
209 LOG:  pg_hint_plan:
210 used hint:
211 not used hint:
212 duplication hint:
213 error hint:
214 Set(work_mem 1M)
215
216               QUERY PLAN              
217 --------------------------------------
218  Merge Join
219    Merge Cond: (t1.id = t2.id)
220    ->  Index Scan using t1_pkey on t1
221    ->  Index Scan using t2_pkey on t2
222 (4 rows)
223
224 /*+Set(work_mem "1MB")*/
225 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
226 LOG:  pg_hint_plan:
227 used hint:
228 Set(work_mem 1MB)
229 not used hint:
230 duplication hint:
231 error hint:
232
233               QUERY PLAN              
234 --------------------------------------
235  Merge Join
236    Merge Cond: (t1.id = t2.id)
237    ->  Index Scan using t1_pkey on t1
238    ->  Index Scan using t2_pkey on t2
239 (4 rows)
240
241 /*+Set(work_mem TO "1MB")*/
242 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
243 INFO:  hint syntax error at or near "Set(work_mem TO "1MB")"
244 DETAIL:  Set hint requires name and value of GUC parameter.
245 LOG:  pg_hint_plan:
246 used hint:
247 not used hint:
248 duplication hint:
249 error hint:
250 Set(work_mem TO 1MB)
251
252               QUERY PLAN              
253 --------------------------------------
254  Merge Join
255    Merge Cond: (t1.id = t2.id)
256    ->  Index Scan using t1_pkey on t1
257    ->  Index Scan using t2_pkey on t2
258 (4 rows)
259
260 /*+SeqScan(t1 t2)*/
261 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
262 INFO:  hint syntax error at or near ""
263 DETAIL:  SeqScan hint accepts only one relation.
264 LOG:  pg_hint_plan:
265 used hint:
266 not used hint:
267 duplication hint:
268 error hint:
269 SeqScan(t1 t2)
270
271               QUERY PLAN              
272 --------------------------------------
273  Merge Join
274    Merge Cond: (t1.id = t2.id)
275    ->  Index Scan using t1_pkey on t1
276    ->  Index Scan using t2_pkey on t2
277 (4 rows)
278
279 /*+SeqScan(t1)*/
280 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
281 LOG:  pg_hint_plan:
282 used hint:
283 SeqScan(t1)
284 not used hint:
285 duplication hint:
286 error hint:
287
288           QUERY PLAN          
289 ------------------------------
290  Hash Join
291    Hash Cond: (t1.id = t2.id)
292    ->  Seq Scan on t1
293    ->  Hash
294          ->  Seq Scan on t2
295 (5 rows)
296
297 /*+SeqScan(t1)IndexScan(t2)*/
298 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
299 LOG:  pg_hint_plan:
300 used hint:
301 SeqScan(t1)
302 IndexScan(t2)
303 not used hint:
304 duplication hint:
305 error hint:
306
307                  QUERY PLAN                 
308 --------------------------------------------
309  Hash Join
310    Hash Cond: (t1.id = t2.id)
311    ->  Seq Scan on t1
312    ->  Hash
313          ->  Index Scan using t2_pkey on t2
314 (5 rows)
315
316 /*+BitmapScan(t2)*/
317 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
318 LOG:  pg_hint_plan:
319 used hint:
320 BitmapScan(t2)
321 not used hint:
322 duplication hint:
323 error hint:
324
325                 QUERY PLAN                
326 ------------------------------------------
327  Nested Loop
328    ->  Seq Scan on t1
329    ->  Bitmap Heap Scan on t2
330          Recheck Cond: (id = t1.id)
331          ->  Bitmap Index Scan on t2_pkey
332                Index Cond: (id = t1.id)
333 (6 rows)
334
335 /*+BitmapScan(t2)NoSeqScan(t1)*/
336 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
337 LOG:  pg_hint_plan:
338 used hint:
339 NoSeqScan(t1)
340 BitmapScan(t2)
341 not used hint:
342 duplication hint:
343 error hint:
344
345                 QUERY PLAN                
346 ------------------------------------------
347  Nested Loop
348    ->  Index Scan using t1_pkey on t1
349    ->  Bitmap Heap Scan on t2
350          Recheck Cond: (id = t1.id)
351          ->  Bitmap Index Scan on t2_pkey
352                Index Cond: (id = t1.id)
353 (6 rows)
354
355 /*+NoIndexScan(t1)*/
356 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
357 LOG:  pg_hint_plan:
358 used hint:
359 NoIndexScan(t1)
360 not used hint:
361 duplication hint:
362 error hint:
363
364           QUERY PLAN          
365 ------------------------------
366  Hash Join
367    Hash Cond: (t1.id = t2.id)
368    ->  Seq Scan on t1
369    ->  Hash
370          ->  Seq Scan on t2
371 (5 rows)
372
373 /*+NoBitmapScan(t1)*/
374 EXPLAIN (COSTS false) SELECT * FROM t1, t4 WHERE t1.val < 10;
375 LOG:  pg_hint_plan:
376 used hint:
377 NoBitmapScan(t1)
378 not used hint:
379 duplication hint:
380 error hint:
381
382          QUERY PLAN         
383 ----------------------------
384  Nested Loop
385    ->  Seq Scan on t1
386          Filter: (val < 10)
387    ->  Materialize
388          ->  Seq Scan on t4
389 (5 rows)
390
391 /*+TidScan(t4)*/
392 EXPLAIN (COSTS false) SELECT * FROM t3, t4 WHERE t3.id = t4.id AND t4.ctid = '(1,1)';
393 LOG:  pg_hint_plan:
394 used hint:
395 TidScan(t4)
396 not used hint:
397 duplication hint:
398 error hint:
399
400                   QUERY PLAN                   
401 -----------------------------------------------
402  Merge Join
403    Merge Cond: (t3.id = t4.id)
404    ->  Index Scan using t3_pkey on t3
405    ->  Sort
406          Sort Key: t4.id
407          ->  Tid Scan on t4
408                TID Cond: (ctid = '(1,1)'::tid)
409 (7 rows)
410
411 /*+NoTidScan(t1)*/
412 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)';
413 LOG:  pg_hint_plan:
414 used hint:
415 NoTidScan(t1)
416 not used hint:
417 duplication hint:
418 error hint:
419
420               QUERY PLAN               
421 ---------------------------------------
422  Nested Loop
423    ->  Seq Scan on t1
424          Filter: (ctid = '(1,1)'::tid)
425    ->  Index Scan using t2_pkey on t2
426          Index Cond: (id = t1.id)
427 (5 rows)
428
429 /*+HashJoin(t1 t2)*/
430 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
431 LOG:  pg_hint_plan:
432 used hint:
433 HashJoin(t1 t2)
434 not used hint:
435 duplication hint:
436 error hint:
437
438           QUERY PLAN          
439 ------------------------------
440  Hash Join
441    Hash Cond: (t1.id = t2.id)
442    ->  Seq Scan on t1
443    ->  Hash
444          ->  Seq Scan on t2
445 (5 rows)
446
447 /*+NestLoop(t1 t2)*/
448 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
449 LOG:  pg_hint_plan:
450 used hint:
451 NestLoop(t1 t2)
452 not used hint:
453 duplication hint:
454 error hint:
455
456               QUERY PLAN              
457 --------------------------------------
458  Nested Loop
459    ->  Seq Scan on t2
460    ->  Index Scan using t1_pkey on t1
461          Index Cond: (id = t2.id)
462 (4 rows)
463
464 /*+NoMergeJoin(t1 t2)*/
465 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
466 LOG:  pg_hint_plan:
467 used hint:
468 NoMergeJoin(t1 t2)
469 not used hint:
470 duplication hint:
471 error hint:
472
473           QUERY PLAN          
474 ------------------------------
475  Hash Join
476    Hash Cond: (t1.id = t2.id)
477    ->  Seq Scan on t1
478    ->  Hash
479          ->  Seq Scan on t2
480 (5 rows)
481
482 /*+MergeJoin(t1 t3)*/
483 EXPLAIN (COSTS false) SELECT * FROM t1, t3 WHERE t1.val = t3.val;
484 LOG:  pg_hint_plan:
485 used hint:
486 MergeJoin(t1 t3)
487 not used hint:
488 duplication hint:
489 error hint:
490
491              QUERY PLAN              
492 -------------------------------------
493  Merge Join
494    Merge Cond: (t1.val = t3.val)
495    ->  Index Scan using t1_val on t1
496    ->  Sort
497          Sort Key: t3.val
498          ->  Seq Scan on t3
499 (6 rows)
500
501 /*+NestLoop(t1 t3)*/
502 EXPLAIN (COSTS false) SELECT * FROM t1, t3 WHERE t1.val = t3.val;
503 LOG:  pg_hint_plan:
504 used hint:
505 NestLoop(t1 t3)
506 not used hint:
507 duplication hint:
508 error hint:
509
510              QUERY PLAN              
511 -------------------------------------
512  Nested Loop
513    ->  Seq Scan on t3
514    ->  Index Scan using t1_val on t1
515          Index Cond: (val = t3.val)
516 (4 rows)
517
518 /*+NoHashJoin(t1 t3)*/
519 EXPLAIN (COSTS false) SELECT * FROM t1, t3 WHERE t1.val = t3.val;
520 LOG:  pg_hint_plan:
521 used hint:
522 NoHashJoin(t1 t3)
523 not used hint:
524 duplication hint:
525 error hint:
526
527              QUERY PLAN              
528 -------------------------------------
529  Nested Loop
530    ->  Seq Scan on t3
531    ->  Index Scan using t1_val on t1
532          Index Cond: (val = t3.val)
533 (4 rows)
534
535 /*+MergeJoin(t4 t1 t2 t3)*/
536 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
537 LOG:  pg_hint_plan:
538 used hint:
539 MergeJoin(t1 t2 t3 t4)
540 not used hint:
541 duplication hint:
542 error hint:
543
544                     QUERY PLAN                    
545 --------------------------------------------------
546  Merge Join
547    Merge Cond: (t1.id = t4.id)
548    ->  Merge Join
549          Merge Cond: (t1.id = t3.id)
550          ->  Merge Join
551                Merge Cond: (t1.id = t2.id)
552                ->  Index Scan using t1_pkey on t1
553                ->  Index Scan using t2_pkey on t2
554          ->  Index Scan using t3_pkey on t3
555    ->  Sort
556          Sort Key: t4.id
557          ->  Seq Scan on t4
558 (12 rows)
559
560 /*+HashJoin(t3 t4 t1 t2)*/
561 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
562 LOG:  pg_hint_plan:
563 used hint:
564 HashJoin(t1 t2 t3 t4)
565 not used hint:
566 duplication hint:
567 error hint:
568
569                        QUERY PLAN                       
570 --------------------------------------------------------
571  Hash Join
572    Hash Cond: (t3.id = t1.id)
573    ->  Seq Scan on t3
574    ->  Hash
575          ->  Merge Join
576                Merge Cond: (t1.id = t4.id)
577                ->  Merge Join
578                      Merge Cond: (t1.id = t2.id)
579                      ->  Index Scan using t1_pkey on t1
580                      ->  Index Scan using t2_pkey on t2
581                ->  Sort
582                      Sort Key: t4.id
583                      ->  Seq Scan on t4
584 (13 rows)
585
586 /*+NestLoop(t2 t3 t4 t1) IndexScan(t3)*/
587 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
588 LOG:  pg_hint_plan:
589 used hint:
590 IndexScan(t3)
591 NestLoop(t1 t2 t3 t4)
592 not used hint:
593 duplication hint:
594 error hint:
595
596                     QUERY PLAN                    
597 --------------------------------------------------
598  Nested Loop
599    ->  Merge Join
600          Merge Cond: (t1.id = t4.id)
601          ->  Merge Join
602                Merge Cond: (t1.id = t2.id)
603                ->  Index Scan using t1_pkey on t1
604                ->  Index Scan using t2_pkey on t2
605          ->  Sort
606                Sort Key: t4.id
607                ->  Seq Scan on t4
608    ->  Index Scan using t3_pkey on t3
609          Index Cond: (id = t1.id)
610 (12 rows)
611
612 /*+NoNestLoop(t4 t1 t3 t2)*/
613 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
614 LOG:  pg_hint_plan:
615 used hint:
616 NoNestLoop(t1 t2 t3 t4)
617 not used hint:
618 duplication hint:
619 error hint:
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( */
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 ""
640 DETAIL:  Closing parenthesis is necessary.
641                     QUERY PLAN                    
642 --------------------------------------------------
643  Merge Join
644    Merge Cond: (t1.id = t4.id)
645    ->  Merge Join
646          Merge Cond: (t1.id = t3.id)
647          ->  Merge Join
648                Merge Cond: (t1.id = t2.id)
649                ->  Index Scan using t1_pkey on t1
650                ->  Index Scan using t2_pkey on t2
651          ->  Index Scan using t3_pkey on t3
652    ->  Sort
653          Sort Key: t4.id
654          ->  Seq Scan on t4
655 (12 rows)
656
657 /*+Leading( )*/
658 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
659 INFO:  hint syntax error at or near "Leading( )"
660 DETAIL:  Leading hint requires at least two relations.
661 LOG:  pg_hint_plan:
662 used hint:
663 not used hint:
664 duplication hint:
665 error hint:
666 Leading()
667
668                     QUERY PLAN                    
669 --------------------------------------------------
670  Merge Join
671    Merge Cond: (t1.id = t4.id)
672    ->  Merge Join
673          Merge Cond: (t1.id = t3.id)
674          ->  Merge Join
675                Merge Cond: (t1.id = t2.id)
676                ->  Index Scan using t1_pkey on t1
677                ->  Index Scan using t2_pkey on t2
678          ->  Index Scan using t3_pkey on t3
679    ->  Sort
680          Sort Key: t4.id
681          ->  Seq Scan on t4
682 (12 rows)
683
684 /*+Leading( t3 )*/
685 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
686 INFO:  hint syntax error at or near "Leading( t3 )"
687 DETAIL:  Leading hint requires at least two relations.
688 LOG:  pg_hint_plan:
689 used hint:
690 not used hint:
691 duplication hint:
692 error hint:
693 Leading(t3)
694
695                     QUERY PLAN                    
696 --------------------------------------------------
697  Merge Join
698    Merge Cond: (t1.id = t4.id)
699    ->  Merge Join
700          Merge Cond: (t1.id = t3.id)
701          ->  Merge Join
702                Merge Cond: (t1.id = t2.id)
703                ->  Index Scan using t1_pkey on t1
704                ->  Index Scan using t2_pkey on t2
705          ->  Index Scan using t3_pkey on t3
706    ->  Sort
707          Sort Key: t4.id
708          ->  Seq Scan on t4
709 (12 rows)
710
711 /*+Leading( t3 t4 )*/
712 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
713 LOG:  pg_hint_plan:
714 used hint:
715 Leading(t3 t4)
716 not used hint:
717 duplication hint:
718 error hint:
719
720                     QUERY PLAN                    
721 --------------------------------------------------
722  Nested Loop
723    ->  Nested Loop
724          ->  Merge Join
725                Merge Cond: (t3.id = t4.id)
726                ->  Index Scan using t3_pkey on t3
727                ->  Sort
728                      Sort Key: t4.id
729                      ->  Seq Scan on t4
730          ->  Index Scan using t2_pkey on t2
731                Index Cond: (id = t3.id)
732    ->  Index Scan using t1_pkey on t1
733          Index Cond: (id = t2.id)
734 (12 rows)
735
736 /*+Leading(t3 t4 t1)*/
737 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
738 LOG:  pg_hint_plan:
739 used hint:
740 Leading(t3 t4 t1)
741 not used hint:
742 duplication hint:
743 error hint:
744
745                     QUERY PLAN                    
746 --------------------------------------------------
747  Nested Loop
748    ->  Merge Join
749          Merge Cond: (t3.id = t1.id)
750          ->  Merge Join
751                Merge Cond: (t3.id = t4.id)
752                ->  Index Scan using t3_pkey on t3
753                ->  Sort
754                      Sort Key: t4.id
755                      ->  Seq Scan on t4
756          ->  Index Scan using t1_pkey on t1
757    ->  Index Scan using t2_pkey on t2
758          Index Cond: (id = t1.id)
759 (12 rows)
760
761 /*+Leading(t3 t4 t1 t2)*/
762 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
763 LOG:  pg_hint_plan:
764 used hint:
765 Leading(t3 t4 t1 t2)
766 not used hint:
767 duplication hint:
768 error hint:
769
770                     QUERY PLAN                    
771 --------------------------------------------------
772  Nested Loop
773    ->  Merge Join
774          Merge Cond: (t3.id = t1.id)
775          ->  Merge Join
776                Merge Cond: (t3.id = t4.id)
777                ->  Index Scan using t3_pkey on t3
778                ->  Sort
779                      Sort Key: t4.id
780                      ->  Seq Scan on t4
781          ->  Index Scan using t1_pkey on t1
782    ->  Index Scan using t2_pkey on t2
783          Index Cond: (id = t1.id)
784 (12 rows)
785
786 /*+Leading(t3 t4 t1 t2 t1)*/
787 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
788 INFO:  hint syntax error at or near "Leading(t3 t4 t1 t2 t1)"
789 DETAIL:  Relation name "t1" is duplicated.
790 LOG:  pg_hint_plan:
791 used hint:
792 not used hint:
793 duplication hint:
794 error hint:
795 Leading(t3 t4 t1 t2 t1)
796
797                     QUERY PLAN                    
798 --------------------------------------------------
799  Merge Join
800    Merge Cond: (t1.id = t4.id)
801    ->  Merge Join
802          Merge Cond: (t1.id = t3.id)
803          ->  Merge Join
804                Merge Cond: (t1.id = t2.id)
805                ->  Index Scan using t1_pkey on t1
806                ->  Index Scan using t2_pkey on t2
807          ->  Index Scan using t3_pkey on t3
808    ->  Sort
809          Sort Key: t4.id
810          ->  Seq Scan on t4
811 (12 rows)
812
813 /*+Leading(t3 t4 t4)*/
814 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
815 INFO:  hint syntax error at or near "Leading(t3 t4 t4)"
816 DETAIL:  Relation name "t4" is duplicated.
817 LOG:  pg_hint_plan:
818 used hint:
819 not used hint:
820 duplication hint:
821 error hint:
822 Leading(t3 t4 t4)
823
824                     QUERY PLAN                    
825 --------------------------------------------------
826  Merge Join
827    Merge Cond: (t1.id = t4.id)
828    ->  Merge Join
829          Merge Cond: (t1.id = t3.id)
830          ->  Merge Join
831                Merge Cond: (t1.id = t2.id)
832                ->  Index Scan using t1_pkey on t1
833                ->  Index Scan using t2_pkey on t2
834          ->  Index Scan using t3_pkey on t3
835    ->  Sort
836          Sort Key: t4.id
837          ->  Seq Scan on t4
838 (12 rows)
839
840 EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
841                   QUERY PLAN                   
842 -----------------------------------------------
843  Nested Loop
844    ->  Values Scan on "*VALUES*"
845    ->  Index Scan using t1_pkey on t1
846          Index Cond: (id = "*VALUES*".column1)
847 (4 rows)
848
849 /*+HashJoin(t1 t2)*/
850 EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
851 LOG:  pg_hint_plan:
852 used hint:
853 not used hint:
854 HashJoin(t1 t2)
855 duplication hint:
856 error hint:
857
858                   QUERY PLAN                   
859 -----------------------------------------------
860  Nested Loop
861    ->  Values Scan on "*VALUES*"
862    ->  Index Scan using t1_pkey on t1
863          Index Cond: (id = "*VALUES*".column1)
864 (4 rows)
865
866 /*+HashJoin(t1 *VALUES*)*/
867 EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
868 LOG:  pg_hint_plan:
869 used hint:
870 HashJoin(*VALUES* t1)
871 not used hint:
872 duplication hint:
873 error hint:
874
875                 QUERY PLAN                 
876 -------------------------------------------
877  Hash Join
878    Hash Cond: (t1.id = "*VALUES*".column1)
879    ->  Seq Scan on t1
880    ->  Hash
881          ->  Values Scan on "*VALUES*"
882 (5 rows)
883
884 /*+HashJoin(t1 *VALUES*) IndexScan(t1) IndexScan(*VALUES*)*/
885 EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
886 LOG:  pg_hint_plan:
887 used hint:
888 IndexScan(t1)
889 HashJoin(*VALUES* t1)
890 not used hint:
891 IndexScan(*VALUES*)
892 duplication hint:
893 error hint:
894
895                 QUERY PLAN                 
896 -------------------------------------------
897  Hash Join
898    Hash Cond: (t1.id = "*VALUES*".column1)
899    ->  Index Scan using t1_pkey on t1
900    ->  Hash
901          ->  Values Scan on "*VALUES*"
902 (5 rows)
903
904 -- single table scan hint test
905 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);
906                                              QUERY PLAN                                              
907 -----------------------------------------------------------------------------------------------------
908  Index Scan using t1_pkey on t1  (cost=1.89..10.16 rows=1 width=4)
909    Index Cond: (id = $3)
910    InitPlan 2 (returns $1)
911      ->  Result  (cost=0.94..0.95 rows=1 width=0)
912            InitPlan 1 (returns $0)
913              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
914                    ->  Index Scan Backward using t1_pkey on t1 v_1  (cost=0.00..8.43 rows=9 width=4)
915                          Index Cond: ((id IS NOT NULL) AND (id < 10))
916    InitPlan 4 (returns $3)
917      ->  Result  (cost=0.94..0.95 rows=1 width=0)
918            InitPlan 3 (returns $2)
919              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
920                    ->  Index Scan Backward using t1_pkey on t1 v_2  (cost=0.00..8.43 rows=9 width=4)
921                          Index Cond: ((id IS NOT NULL) AND (id < 10))
922 (14 rows)
923
924 /*+BitmapScan(v_1)*/
925 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);
926 LOG:  pg_hint_plan:
927 used hint:
928 BitmapScan(v_1)
929 not used hint:
930 duplication hint:
931 error hint:
932
933                                              QUERY PLAN                                              
934 -----------------------------------------------------------------------------------------------------
935  Index Scan using t1_pkey on t1  (cost=29.34..37.61 rows=1 width=4)
936    Index Cond: (id = $2)
937    InitPlan 1 (returns $0)
938      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
939            ->  Bitmap Heap Scan on t1 v_1  (cost=4.32..28.36 rows=9 width=4)
940                  Recheck Cond: (id < 10)
941                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
942                        Index Cond: (id < 10)
943    InitPlan 3 (returns $2)
944      ->  Result  (cost=0.94..0.95 rows=1 width=0)
945            InitPlan 2 (returns $1)
946              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
947                    ->  Index Scan Backward using t1_pkey on t1 v_2  (cost=0.00..8.43 rows=9 width=4)
948                          Index Cond: ((id IS NOT NULL) AND (id < 10))
949 (14 rows)
950
951 /*+BitmapScan(v_2)*/
952 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);
953 LOG:  pg_hint_plan:
954 used hint:
955 BitmapScan(v_2)
956 not used hint:
957 duplication hint:
958 error hint:
959
960                                              QUERY PLAN                                              
961 -----------------------------------------------------------------------------------------------------
962  Index Scan using t1_pkey on t1  (cost=29.34..37.61 rows=1 width=4)
963    Index Cond: (id = $2)
964    InitPlan 2 (returns $1)
965      ->  Result  (cost=0.94..0.95 rows=1 width=0)
966            InitPlan 1 (returns $0)
967              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
968                    ->  Index Scan Backward using t1_pkey on t1 v_1  (cost=0.00..8.43 rows=9 width=4)
969                          Index Cond: ((id IS NOT NULL) AND (id < 10))
970    InitPlan 3 (returns $2)
971      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
972            ->  Bitmap Heap Scan on t1 v_2  (cost=4.32..28.36 rows=9 width=4)
973                  Recheck Cond: (id < 10)
974                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
975                        Index Cond: (id < 10)
976 (14 rows)
977
978 /*+BitmapScan(t1)*/
979 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);
980 LOG:  pg_hint_plan:
981 used hint:
982 BitmapScan(t1)
983 not used hint:
984 duplication hint:
985 error hint:
986
987                                              QUERY PLAN                                              
988 -----------------------------------------------------------------------------------------------------
989  Bitmap Heap Scan on t1  (cost=6.15..10.17 rows=1 width=4)
990    Recheck Cond: (id = $3)
991    InitPlan 2 (returns $1)
992      ->  Result  (cost=0.94..0.95 rows=1 width=0)
993            InitPlan 1 (returns $0)
994              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
995                    ->  Index Scan Backward using t1_pkey on t1 v_1  (cost=0.00..8.43 rows=9 width=4)
996                          Index Cond: ((id IS NOT NULL) AND (id < 10))
997    InitPlan 4 (returns $3)
998      ->  Result  (cost=0.94..0.95 rows=1 width=0)
999            InitPlan 3 (returns $2)
1000              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
1001                    ->  Index Scan Backward using t1_pkey on t1 v_2  (cost=0.00..8.43 rows=9 width=4)
1002                          Index Cond: ((id IS NOT NULL) AND (id < 10))
1003    ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.26 rows=1 width=0)
1004          Index Cond: (id = $3)
1005 (16 rows)
1006
1007 /*+BitmapScan(v_1)BitmapScan(v_2)*/
1008 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);
1009 LOG:  pg_hint_plan:
1010 used hint:
1011 BitmapScan(v_1)
1012 BitmapScan(v_2)
1013 not used hint:
1014 duplication hint:
1015 error hint:
1016
1017                                      QUERY PLAN                                     
1018 ------------------------------------------------------------------------------------
1019  Index Scan using t1_pkey on t1  (cost=56.78..65.05 rows=1 width=4)
1020    Index Cond: (id = $1)
1021    InitPlan 1 (returns $0)
1022      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
1023            ->  Bitmap Heap Scan on t1 v_1  (cost=4.32..28.36 rows=9 width=4)
1024                  Recheck Cond: (id < 10)
1025                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
1026                        Index Cond: (id < 10)
1027    InitPlan 2 (returns $1)
1028      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
1029            ->  Bitmap Heap Scan on t1 v_2  (cost=4.32..28.36 rows=9 width=4)
1030                  Recheck Cond: (id < 10)
1031                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
1032                        Index Cond: (id < 10)
1033 (14 rows)
1034
1035 /*+BitmapScan(v_1)BitmapScan(t1)*/
1036 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);
1037 LOG:  pg_hint_plan:
1038 used hint:
1039 BitmapScan(t1)
1040 BitmapScan(v_1)
1041 not used hint:
1042 duplication hint:
1043 error hint:
1044
1045                                              QUERY PLAN                                              
1046 -----------------------------------------------------------------------------------------------------
1047  Bitmap Heap Scan on t1  (cost=33.60..37.61 rows=1 width=4)
1048    Recheck Cond: (id = $2)
1049    InitPlan 1 (returns $0)
1050      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
1051            ->  Bitmap Heap Scan on t1 v_1  (cost=4.32..28.36 rows=9 width=4)
1052                  Recheck Cond: (id < 10)
1053                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
1054                        Index Cond: (id < 10)
1055    InitPlan 3 (returns $2)
1056      ->  Result  (cost=0.94..0.95 rows=1 width=0)
1057            InitPlan 2 (returns $1)
1058              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
1059                    ->  Index Scan Backward using t1_pkey on t1 v_2  (cost=0.00..8.43 rows=9 width=4)
1060                          Index Cond: ((id IS NOT NULL) AND (id < 10))
1061    ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.26 rows=1 width=0)
1062          Index Cond: (id = $2)
1063 (16 rows)
1064
1065 /*+BitmapScan(v_2)BitmapScan(t1)*/
1066 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);
1067 LOG:  pg_hint_plan:
1068 used hint:
1069 BitmapScan(t1)
1070 BitmapScan(v_2)
1071 not used hint:
1072 duplication hint:
1073 error hint:
1074
1075                                              QUERY PLAN                                              
1076 -----------------------------------------------------------------------------------------------------
1077  Bitmap Heap Scan on t1  (cost=33.60..37.61 rows=1 width=4)
1078    Recheck Cond: (id = $2)
1079    InitPlan 2 (returns $1)
1080      ->  Result  (cost=0.94..0.95 rows=1 width=0)
1081            InitPlan 1 (returns $0)
1082              ->  Limit  (cost=0.00..0.94 rows=1 width=4)
1083                    ->  Index Scan Backward using t1_pkey on t1 v_1  (cost=0.00..8.43 rows=9 width=4)
1084                          Index Cond: ((id IS NOT NULL) AND (id < 10))
1085    InitPlan 3 (returns $2)
1086      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
1087            ->  Bitmap Heap Scan on t1 v_2  (cost=4.32..28.36 rows=9 width=4)
1088                  Recheck Cond: (id < 10)
1089                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
1090                        Index Cond: (id < 10)
1091    ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.26 rows=1 width=0)
1092          Index Cond: (id = $2)
1093 (16 rows)
1094
1095 /*+BitmapScan(v_1)BitmapScan(v_2)BitmapScan(t1)*/
1096 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);
1097 LOG:  pg_hint_plan:
1098 used hint:
1099 BitmapScan(t1)
1100 BitmapScan(v_1)
1101 BitmapScan(v_2)
1102 not used hint:
1103 duplication hint:
1104 error hint:
1105
1106                                      QUERY PLAN                                     
1107 ------------------------------------------------------------------------------------
1108  Bitmap Heap Scan on t1  (cost=61.04..65.05 rows=1 width=4)
1109    Recheck Cond: (id = $1)
1110    InitPlan 1 (returns $0)
1111      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
1112            ->  Bitmap Heap Scan on t1 v_1  (cost=4.32..28.36 rows=9 width=4)
1113                  Recheck Cond: (id < 10)
1114                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
1115                        Index Cond: (id < 10)
1116    InitPlan 2 (returns $1)
1117      ->  Aggregate  (cost=28.38..28.39 rows=1 width=4)
1118            ->  Bitmap Heap Scan on t1 v_2  (cost=4.32..28.36 rows=9 width=4)
1119                  Recheck Cond: (id < 10)
1120                  ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.32 rows=9 width=0)
1121                        Index Cond: (id < 10)
1122    ->  Bitmap Index Scan on t1_pkey  (cost=0.00..4.26 rows=1 width=0)
1123          Index Cond: (id = $1)
1124 (16 rows)
1125
1126 -- full scan hint pattern test
1127 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1128             QUERY PLAN             
1129 -----------------------------------
1130  Tid Scan on t1
1131    TID Cond: (ctid = '(1,1)'::tid)
1132    Filter: (id < 10)
1133 (3 rows)
1134
1135 /*+SeqScan(t1)*/
1136 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1137 LOG:  pg_hint_plan:
1138 used hint:
1139 SeqScan(t1)
1140 not used hint:
1141 duplication hint:
1142 error hint:
1143
1144                    QUERY PLAN                    
1145 -------------------------------------------------
1146  Seq Scan on t1
1147    Filter: ((id < 10) AND (ctid = '(1,1)'::tid))
1148 (2 rows)
1149
1150 /*+IndexScan(t1)*/
1151 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1152 LOG:  pg_hint_plan:
1153 used hint:
1154 IndexScan(t1)
1155 not used hint:
1156 duplication hint:
1157 error hint:
1158
1159            QUERY PLAN            
1160 ---------------------------------
1161  Index Scan using t1_pkey on t1
1162    Index Cond: (id < 10)
1163    Filter: (ctid = '(1,1)'::tid)
1164 (3 rows)
1165
1166 /*+BitmapScan(t1)*/
1167 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1168 LOG:  pg_hint_plan:
1169 used hint:
1170 BitmapScan(t1)
1171 not used hint:
1172 duplication hint:
1173 error hint:
1174
1175              QUERY PLAN             
1176 ------------------------------------
1177  Bitmap Heap Scan on t1
1178    Recheck Cond: (id < 10)
1179    Filter: (ctid = '(1,1)'::tid)
1180    ->  Bitmap Index Scan on t1_pkey
1181          Index Cond: (id < 10)
1182 (5 rows)
1183
1184 /*+TidScan(t1)*/
1185 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1186 LOG:  pg_hint_plan:
1187 used hint:
1188 TidScan(t1)
1189 not used hint:
1190 duplication hint:
1191 error hint:
1192
1193             QUERY PLAN             
1194 -----------------------------------
1195  Tid Scan on t1
1196    TID Cond: (ctid = '(1,1)'::tid)
1197    Filter: (id < 10)
1198 (3 rows)
1199
1200 /*+NoSeqScan(t1)*/
1201 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1202 LOG:  pg_hint_plan:
1203 used hint:
1204 NoSeqScan(t1)
1205 not used hint:
1206 duplication hint:
1207 error hint:
1208
1209             QUERY PLAN             
1210 -----------------------------------
1211  Tid Scan on t1
1212    TID Cond: (ctid = '(1,1)'::tid)
1213    Filter: (id < 10)
1214 (3 rows)
1215
1216 /*+NoIndexScan(t1)*/
1217 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1218 LOG:  pg_hint_plan:
1219 used hint:
1220 NoIndexScan(t1)
1221 not used hint:
1222 duplication hint:
1223 error hint:
1224
1225             QUERY PLAN             
1226 -----------------------------------
1227  Tid Scan on t1
1228    TID Cond: (ctid = '(1,1)'::tid)
1229    Filter: (id < 10)
1230 (3 rows)
1231
1232 /*+NoBitmapScan(t1)*/
1233 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1234 LOG:  pg_hint_plan:
1235 used hint:
1236 NoBitmapScan(t1)
1237 not used hint:
1238 duplication hint:
1239 error hint:
1240
1241             QUERY PLAN             
1242 -----------------------------------
1243  Tid Scan on t1
1244    TID Cond: (ctid = '(1,1)'::tid)
1245    Filter: (id < 10)
1246 (3 rows)
1247
1248 /*+NoTidScan(t1)*/
1249 EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1250 LOG:  pg_hint_plan:
1251 used hint:
1252 NoTidScan(t1)
1253 not used hint:
1254 duplication hint:
1255 error hint:
1256
1257            QUERY PLAN            
1258 ---------------------------------
1259  Index Scan using t1_pkey on t1
1260    Index Cond: (id < 10)
1261    Filter: (ctid = '(1,1)'::tid)
1262 (3 rows)
1263
1264 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1265                QUERY PLAN                
1266 -----------------------------------------
1267  Nested Loop
1268    Join Filter: (t1.id = t2.id)
1269    ->  Tid Scan on t1
1270          TID Cond: (ctid = '(1,1)'::tid)
1271    ->  Tid Scan on t2
1272          TID Cond: (ctid = '(1,1)'::tid)
1273 (6 rows)
1274
1275 /*+SeqScan(t1)*/
1276 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1277 LOG:  pg_hint_plan:
1278 used hint:
1279 SeqScan(t1)
1280 not used hint:
1281 duplication hint:
1282 error hint:
1283
1284                QUERY PLAN                
1285 -----------------------------------------
1286  Nested Loop
1287    Join Filter: (t1.id = t2.id)
1288    ->  Seq Scan on t1
1289          Filter: (ctid = '(1,1)'::tid)
1290    ->  Tid Scan on t2
1291          TID Cond: (ctid = '(1,1)'::tid)
1292 (6 rows)
1293
1294 /*+SeqScan(t2)*/
1295 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1296 LOG:  pg_hint_plan:
1297 used hint:
1298 SeqScan(t2)
1299 not used hint:
1300 duplication hint:
1301 error hint:
1302
1303                QUERY PLAN                
1304 -----------------------------------------
1305  Nested Loop
1306    Join Filter: (t1.id = t2.id)
1307    ->  Tid Scan on t1
1308          TID Cond: (ctid = '(1,1)'::tid)
1309    ->  Seq Scan on t2
1310          Filter: (ctid = '(1,1)'::tid)
1311 (6 rows)
1312
1313 /*+SeqScan(t1) SeqScan(t2)*/
1314 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1315 LOG:  pg_hint_plan:
1316 used hint:
1317 SeqScan(t1)
1318 SeqScan(t2)
1319 not used hint:
1320 duplication hint:
1321 error hint:
1322
1323               QUERY PLAN               
1324 ---------------------------------------
1325  Nested Loop
1326    Join Filter: (t1.id = t2.id)
1327    ->  Seq Scan on t1
1328          Filter: (ctid = '(1,1)'::tid)
1329    ->  Seq Scan on t2
1330          Filter: (ctid = '(1,1)'::tid)
1331 (6 rows)
1332
1333 /*+SeqScan(t1) IndexScan(t2)*/
1334 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1335 LOG:  pg_hint_plan:
1336 used hint:
1337 SeqScan(t1)
1338 IndexScan(t2)
1339 not used hint:
1340 duplication hint:
1341 error hint:
1342
1343               QUERY PLAN               
1344 ---------------------------------------
1345  Nested Loop
1346    ->  Seq Scan on t1
1347          Filter: (ctid = '(1,1)'::tid)
1348    ->  Index Scan using t2_pkey on t2
1349          Index Cond: (id = t1.id)
1350          Filter: (ctid = '(1,1)'::tid)
1351 (6 rows)
1352
1353 /*+SeqScan(t1) BitmapScan(t2)*/
1354 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1355 LOG:  pg_hint_plan:
1356 used hint:
1357 SeqScan(t1)
1358 BitmapScan(t2)
1359 not used hint:
1360 duplication hint:
1361 error hint:
1362
1363                 QUERY PLAN                
1364 ------------------------------------------
1365  Nested Loop
1366    ->  Seq Scan on t1
1367          Filter: (ctid = '(1,1)'::tid)
1368    ->  Bitmap Heap Scan on t2
1369          Recheck Cond: (id = t1.id)
1370          Filter: (ctid = '(1,1)'::tid)
1371          ->  Bitmap Index Scan on t2_pkey
1372                Index Cond: (id = t1.id)
1373 (8 rows)
1374
1375 /*+SeqScan(t1) TidScan(t2)*/
1376 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1377 LOG:  pg_hint_plan:
1378 used hint:
1379 SeqScan(t1)
1380 TidScan(t2)
1381 not used hint:
1382 duplication hint:
1383 error hint:
1384
1385                QUERY PLAN                
1386 -----------------------------------------
1387  Nested Loop
1388    Join Filter: (t1.id = t2.id)
1389    ->  Seq Scan on t1
1390          Filter: (ctid = '(1,1)'::tid)
1391    ->  Tid Scan on t2
1392          TID Cond: (ctid = '(1,1)'::tid)
1393 (6 rows)
1394
1395 /*+SeqScan(t1) NoSeqScan(t2)*/
1396 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1397 LOG:  pg_hint_plan:
1398 used hint:
1399 SeqScan(t1)
1400 NoSeqScan(t2)
1401 not used hint:
1402 duplication hint:
1403 error hint:
1404
1405                QUERY PLAN                
1406 -----------------------------------------
1407  Nested Loop
1408    Join Filter: (t1.id = t2.id)
1409    ->  Seq Scan on t1
1410          Filter: (ctid = '(1,1)'::tid)
1411    ->  Tid Scan on t2
1412          TID Cond: (ctid = '(1,1)'::tid)
1413 (6 rows)
1414
1415 /*+SeqScan(t1) NoIndexScan(t2)*/
1416 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1417 LOG:  pg_hint_plan:
1418 used hint:
1419 SeqScan(t1)
1420 NoIndexScan(t2)
1421 not used hint:
1422 duplication hint:
1423 error hint:
1424
1425                QUERY PLAN                
1426 -----------------------------------------
1427  Nested Loop
1428    Join Filter: (t1.id = t2.id)
1429    ->  Seq Scan on t1
1430          Filter: (ctid = '(1,1)'::tid)
1431    ->  Tid Scan on t2
1432          TID Cond: (ctid = '(1,1)'::tid)
1433 (6 rows)
1434
1435 /*+SeqScan(t1) NoBitmapScan(t2)*/
1436 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1437 LOG:  pg_hint_plan:
1438 used hint:
1439 SeqScan(t1)
1440 NoBitmapScan(t2)
1441 not used hint:
1442 duplication hint:
1443 error hint:
1444
1445                QUERY PLAN                
1446 -----------------------------------------
1447  Nested Loop
1448    Join Filter: (t1.id = t2.id)
1449    ->  Seq Scan on t1
1450          Filter: (ctid = '(1,1)'::tid)
1451    ->  Tid Scan on t2
1452          TID Cond: (ctid = '(1,1)'::tid)
1453 (6 rows)
1454
1455 /*+SeqScan(t1) NoTidScan(t2)*/
1456 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1457 LOG:  pg_hint_plan:
1458 used hint:
1459 SeqScan(t1)
1460 NoTidScan(t2)
1461 not used hint:
1462 duplication hint:
1463 error hint:
1464
1465               QUERY PLAN               
1466 ---------------------------------------
1467  Nested Loop
1468    ->  Seq Scan on t1
1469          Filter: (ctid = '(1,1)'::tid)
1470    ->  Index Scan using t2_pkey on t2
1471          Index Cond: (id = t1.id)
1472          Filter: (ctid = '(1,1)'::tid)
1473 (6 rows)
1474
1475 /*+IndexScan(t1)*/
1476 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1477 LOG:  pg_hint_plan:
1478 used hint:
1479 IndexScan(t1)
1480 not used hint:
1481 duplication hint:
1482 error hint:
1483
1484                QUERY PLAN                
1485 -----------------------------------------
1486  Nested Loop
1487    ->  Tid Scan on t2
1488          TID Cond: (ctid = '(1,1)'::tid)
1489    ->  Index Scan using t1_pkey on t1
1490          Index Cond: (id = t2.id)
1491          Filter: (ctid = '(1,1)'::tid)
1492 (6 rows)
1493
1494 /*+IndexScan(t2)*/
1495 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1496 LOG:  pg_hint_plan:
1497 used hint:
1498 IndexScan(t2)
1499 not used hint:
1500 duplication hint:
1501 error hint:
1502
1503                QUERY PLAN                
1504 -----------------------------------------
1505  Nested Loop
1506    ->  Tid Scan on t1
1507          TID Cond: (ctid = '(1,1)'::tid)
1508    ->  Index Scan using t2_pkey on t2
1509          Index Cond: (id = t1.id)
1510          Filter: (ctid = '(1,1)'::tid)
1511 (6 rows)
1512
1513 /*+IndexScan(t1) SeqScan(t2)*/
1514 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1515 LOG:  pg_hint_plan:
1516 used hint:
1517 IndexScan(t1)
1518 SeqScan(t2)
1519 not used hint:
1520 duplication hint:
1521 error hint:
1522
1523               QUERY PLAN               
1524 ---------------------------------------
1525  Nested Loop
1526    ->  Seq Scan on t2
1527          Filter: (ctid = '(1,1)'::tid)
1528    ->  Index Scan using t1_pkey on t1
1529          Index Cond: (id = t2.id)
1530          Filter: (ctid = '(1,1)'::tid)
1531 (6 rows)
1532
1533 /*+IndexScan(t1) IndexScan(t2)*/
1534 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1535 LOG:  pg_hint_plan:
1536 used hint:
1537 IndexScan(t1)
1538 IndexScan(t2)
1539 not used hint:
1540 duplication hint:
1541 error hint:
1542
1543               QUERY PLAN               
1544 ---------------------------------------
1545  Nested Loop
1546    ->  Index Scan using t2_pkey on t2
1547          Filter: (ctid = '(1,1)'::tid)
1548    ->  Index Scan using t1_pkey on t1
1549          Index Cond: (id = t2.id)
1550          Filter: (ctid = '(1,1)'::tid)
1551 (6 rows)
1552
1553 /*+IndexScan(t1) BitmapScan(t2)*/
1554 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1555 LOG:  pg_hint_plan:
1556 used hint:
1557 IndexScan(t1)
1558 BitmapScan(t2)
1559 not used hint:
1560 duplication hint:
1561 error hint:
1562
1563                 QUERY PLAN                
1564 ------------------------------------------
1565  Nested Loop
1566    ->  Index Scan using t1_pkey on t1
1567          Filter: (ctid = '(1,1)'::tid)
1568    ->  Bitmap Heap Scan on t2
1569          Recheck Cond: (id = t1.id)
1570          Filter: (ctid = '(1,1)'::tid)
1571          ->  Bitmap Index Scan on t2_pkey
1572                Index Cond: (id = t1.id)
1573 (8 rows)
1574
1575 /*+IndexScan(t1) TidScan(t2)*/
1576 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1577 LOG:  pg_hint_plan:
1578 used hint:
1579 IndexScan(t1)
1580 TidScan(t2)
1581 not used hint:
1582 duplication hint:
1583 error hint:
1584
1585                QUERY PLAN                
1586 -----------------------------------------
1587  Nested Loop
1588    ->  Tid Scan on t2
1589          TID Cond: (ctid = '(1,1)'::tid)
1590    ->  Index Scan using t1_pkey on t1
1591          Index Cond: (id = t2.id)
1592          Filter: (ctid = '(1,1)'::tid)
1593 (6 rows)
1594
1595 /*+IndexScan(t1) NoSeqScan(t2)*/
1596 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1597 LOG:  pg_hint_plan:
1598 used hint:
1599 IndexScan(t1)
1600 NoSeqScan(t2)
1601 not used hint:
1602 duplication hint:
1603 error hint:
1604
1605                QUERY PLAN                
1606 -----------------------------------------
1607  Nested Loop
1608    ->  Tid Scan on t2
1609          TID Cond: (ctid = '(1,1)'::tid)
1610    ->  Index Scan using t1_pkey on t1
1611          Index Cond: (id = t2.id)
1612          Filter: (ctid = '(1,1)'::tid)
1613 (6 rows)
1614
1615 /*+IndexScan(t1) NoIndexScan(t2)*/
1616 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1617 LOG:  pg_hint_plan:
1618 used hint:
1619 IndexScan(t1)
1620 NoIndexScan(t2)
1621 not used hint:
1622 duplication hint:
1623 error hint:
1624
1625                QUERY PLAN                
1626 -----------------------------------------
1627  Nested Loop
1628    ->  Tid Scan on t2
1629          TID Cond: (ctid = '(1,1)'::tid)
1630    ->  Index Scan using t1_pkey on t1
1631          Index Cond: (id = t2.id)
1632          Filter: (ctid = '(1,1)'::tid)
1633 (6 rows)
1634
1635 /*+IndexScan(t1) NoBitmapScan(t2)*/
1636 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1637 LOG:  pg_hint_plan:
1638 used hint:
1639 IndexScan(t1)
1640 NoBitmapScan(t2)
1641 not used hint:
1642 duplication hint:
1643 error hint:
1644
1645                QUERY PLAN                
1646 -----------------------------------------
1647  Nested Loop
1648    ->  Tid Scan on t2
1649          TID Cond: (ctid = '(1,1)'::tid)
1650    ->  Index Scan using t1_pkey on t1
1651          Index Cond: (id = t2.id)
1652          Filter: (ctid = '(1,1)'::tid)
1653 (6 rows)
1654
1655 /*+IndexScan(t1) NoTidScan(t2)*/
1656 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1657 LOG:  pg_hint_plan:
1658 used hint:
1659 IndexScan(t1)
1660 NoTidScan(t2)
1661 not used hint:
1662 duplication hint:
1663 error hint:
1664
1665               QUERY PLAN               
1666 ---------------------------------------
1667  Nested Loop
1668    ->  Seq Scan on t2
1669          Filter: (ctid = '(1,1)'::tid)
1670    ->  Index Scan using t1_pkey on t1
1671          Index Cond: (id = t2.id)
1672          Filter: (ctid = '(1,1)'::tid)
1673 (6 rows)
1674
1675 /*+BitmapScan(t1)*/
1676 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1677 LOG:  pg_hint_plan:
1678 used hint:
1679 BitmapScan(t1)
1680 not used hint:
1681 duplication hint:
1682 error hint:
1683
1684                 QUERY PLAN                
1685 ------------------------------------------
1686  Nested Loop
1687    ->  Tid Scan on t2
1688          TID Cond: (ctid = '(1,1)'::tid)
1689    ->  Bitmap Heap Scan on t1
1690          Recheck Cond: (id = t2.id)
1691          Filter: (ctid = '(1,1)'::tid)
1692          ->  Bitmap Index Scan on t1_pkey
1693                Index Cond: (id = t2.id)
1694 (8 rows)
1695
1696 /*+BitmapScan(t2)*/
1697 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1698 LOG:  pg_hint_plan:
1699 used hint:
1700 BitmapScan(t2)
1701 not used hint:
1702 duplication hint:
1703 error hint:
1704
1705                 QUERY PLAN                
1706 ------------------------------------------
1707  Nested Loop
1708    ->  Tid Scan on t1
1709          TID Cond: (ctid = '(1,1)'::tid)
1710    ->  Bitmap Heap Scan on t2
1711          Recheck Cond: (id = t1.id)
1712          Filter: (ctid = '(1,1)'::tid)
1713          ->  Bitmap Index Scan on t2_pkey
1714                Index Cond: (id = t1.id)
1715 (8 rows)
1716
1717 /*+BitmapScan(t2)*/
1718 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1719 LOG:  pg_hint_plan:
1720 used hint:
1721 BitmapScan(t2)
1722 not used hint:
1723 duplication hint:
1724 error hint:
1725
1726                 QUERY PLAN                
1727 ------------------------------------------
1728  Nested Loop
1729    ->  Tid Scan on t1
1730          TID Cond: (ctid = '(1,1)'::tid)
1731    ->  Bitmap Heap Scan on t2
1732          Recheck Cond: (id = t1.id)
1733          Filter: (ctid = '(1,1)'::tid)
1734          ->  Bitmap Index Scan on t2_pkey
1735                Index Cond: (id = t1.id)
1736 (8 rows)
1737
1738 /*+BitmapScan(t1) SeqScan(t2)*/
1739 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1740 LOG:  pg_hint_plan:
1741 used hint:
1742 BitmapScan(t1)
1743 SeqScan(t2)
1744 not used hint:
1745 duplication hint:
1746 error hint:
1747
1748                 QUERY PLAN                
1749 ------------------------------------------
1750  Nested Loop
1751    ->  Seq Scan on t2
1752          Filter: (ctid = '(1,1)'::tid)
1753    ->  Bitmap Heap Scan on t1
1754          Recheck Cond: (id = t2.id)
1755          Filter: (ctid = '(1,1)'::tid)
1756          ->  Bitmap Index Scan on t1_pkey
1757                Index Cond: (id = t2.id)
1758 (8 rows)
1759
1760 /*+BitmapScan(t1) IndexScan(t2)*/
1761 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1762 LOG:  pg_hint_plan:
1763 used hint:
1764 BitmapScan(t1)
1765 IndexScan(t2)
1766 not used hint:
1767 duplication hint:
1768 error hint:
1769
1770                 QUERY PLAN                
1771 ------------------------------------------
1772  Nested Loop
1773    ->  Index Scan using t2_pkey on t2
1774          Filter: (ctid = '(1,1)'::tid)
1775    ->  Bitmap Heap Scan on t1
1776          Recheck Cond: (id = t2.id)
1777          Filter: (ctid = '(1,1)'::tid)
1778          ->  Bitmap Index Scan on t1_pkey
1779                Index Cond: (id = t2.id)
1780 (8 rows)
1781
1782 /*+BitmapScan(t1) BitmapScan(t2)*/
1783 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1784 LOG:  pg_hint_plan:
1785 used hint:
1786 BitmapScan(t1)
1787 BitmapScan(t2)
1788 not used hint:
1789 duplication hint:
1790 error hint:
1791
1792                 QUERY PLAN                
1793 ------------------------------------------
1794  Nested Loop
1795    ->  Index Scan using t2_pkey on t2
1796          Filter: (ctid = '(1,1)'::tid)
1797    ->  Bitmap Heap Scan on t1
1798          Recheck Cond: (id = t2.id)
1799          Filter: (ctid = '(1,1)'::tid)
1800          ->  Bitmap Index Scan on t1_pkey
1801                Index Cond: (id = t2.id)
1802 (8 rows)
1803
1804 /*+BitmapScan(t1) TidScan(t2)*/
1805 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1806 LOG:  pg_hint_plan:
1807 used hint:
1808 BitmapScan(t1)
1809 TidScan(t2)
1810 not used hint:
1811 duplication hint:
1812 error hint:
1813
1814                 QUERY PLAN                
1815 ------------------------------------------
1816  Nested Loop
1817    ->  Tid Scan on t2
1818          TID Cond: (ctid = '(1,1)'::tid)
1819    ->  Bitmap Heap Scan on t1
1820          Recheck Cond: (id = t2.id)
1821          Filter: (ctid = '(1,1)'::tid)
1822          ->  Bitmap Index Scan on t1_pkey
1823                Index Cond: (id = t2.id)
1824 (8 rows)
1825
1826 /*+BitmapScan(t1) NoSeqScan(t2)*/
1827 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1828 LOG:  pg_hint_plan:
1829 used hint:
1830 BitmapScan(t1)
1831 NoSeqScan(t2)
1832 not used hint:
1833 duplication hint:
1834 error hint:
1835
1836                 QUERY PLAN                
1837 ------------------------------------------
1838  Nested Loop
1839    ->  Tid Scan on t2
1840          TID Cond: (ctid = '(1,1)'::tid)
1841    ->  Bitmap Heap Scan on t1
1842          Recheck Cond: (id = t2.id)
1843          Filter: (ctid = '(1,1)'::tid)
1844          ->  Bitmap Index Scan on t1_pkey
1845                Index Cond: (id = t2.id)
1846 (8 rows)
1847
1848 /*+BitmapScan(t1) NoIndexScan(t2)*/
1849 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1850 LOG:  pg_hint_plan:
1851 used hint:
1852 BitmapScan(t1)
1853 NoIndexScan(t2)
1854 not used hint:
1855 duplication hint:
1856 error hint:
1857
1858                 QUERY PLAN                
1859 ------------------------------------------
1860  Nested Loop
1861    ->  Tid Scan on t2
1862          TID Cond: (ctid = '(1,1)'::tid)
1863    ->  Bitmap Heap Scan on t1
1864          Recheck Cond: (id = t2.id)
1865          Filter: (ctid = '(1,1)'::tid)
1866          ->  Bitmap Index Scan on t1_pkey
1867                Index Cond: (id = t2.id)
1868 (8 rows)
1869
1870 /*+BitmapScan(t1) NoBitmapScan(t2)*/
1871 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1872 LOG:  pg_hint_plan:
1873 used hint:
1874 BitmapScan(t1)
1875 NoBitmapScan(t2)
1876 not used hint:
1877 duplication hint:
1878 error hint:
1879
1880                 QUERY PLAN                
1881 ------------------------------------------
1882  Nested Loop
1883    ->  Tid Scan on t2
1884          TID Cond: (ctid = '(1,1)'::tid)
1885    ->  Bitmap Heap Scan on t1
1886          Recheck Cond: (id = t2.id)
1887          Filter: (ctid = '(1,1)'::tid)
1888          ->  Bitmap Index Scan on t1_pkey
1889                Index Cond: (id = t2.id)
1890 (8 rows)
1891
1892 /*+BitmapScan(t1) NoTidScan(t2)*/
1893 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1894 LOG:  pg_hint_plan:
1895 used hint:
1896 BitmapScan(t1)
1897 NoTidScan(t2)
1898 not used hint:
1899 duplication hint:
1900 error hint:
1901
1902                 QUERY PLAN                
1903 ------------------------------------------
1904  Nested Loop
1905    ->  Seq Scan on t2
1906          Filter: (ctid = '(1,1)'::tid)
1907    ->  Bitmap Heap Scan on t1
1908          Recheck Cond: (id = t2.id)
1909          Filter: (ctid = '(1,1)'::tid)
1910          ->  Bitmap Index Scan on t1_pkey
1911                Index Cond: (id = t2.id)
1912 (8 rows)
1913
1914 /*+TidScan(t1)*/
1915 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1916 LOG:  pg_hint_plan:
1917 used hint:
1918 TidScan(t1)
1919 not used hint:
1920 duplication hint:
1921 error hint:
1922
1923                QUERY PLAN                
1924 -----------------------------------------
1925  Nested Loop
1926    Join Filter: (t1.id = t2.id)
1927    ->  Tid Scan on t1
1928          TID Cond: (ctid = '(1,1)'::tid)
1929    ->  Tid Scan on t2
1930          TID Cond: (ctid = '(1,1)'::tid)
1931 (6 rows)
1932
1933 /*+TidScan(t2)*/
1934 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1935 LOG:  pg_hint_plan:
1936 used hint:
1937 TidScan(t2)
1938 not used hint:
1939 duplication hint:
1940 error hint:
1941
1942                QUERY PLAN                
1943 -----------------------------------------
1944  Nested Loop
1945    Join Filter: (t1.id = t2.id)
1946    ->  Tid Scan on t1
1947          TID Cond: (ctid = '(1,1)'::tid)
1948    ->  Tid Scan on t2
1949          TID Cond: (ctid = '(1,1)'::tid)
1950 (6 rows)
1951
1952 /*+TidScan(t1) SeqScan(t2)*/
1953 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1954 LOG:  pg_hint_plan:
1955 used hint:
1956 TidScan(t1)
1957 SeqScan(t2)
1958 not used hint:
1959 duplication hint:
1960 error hint:
1961
1962                QUERY PLAN                
1963 -----------------------------------------
1964  Nested Loop
1965    Join Filter: (t1.id = t2.id)
1966    ->  Tid Scan on t1
1967          TID Cond: (ctid = '(1,1)'::tid)
1968    ->  Seq Scan on t2
1969          Filter: (ctid = '(1,1)'::tid)
1970 (6 rows)
1971
1972 /*+TidScan(t1) IndexScan(t2)*/
1973 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1974 LOG:  pg_hint_plan:
1975 used hint:
1976 TidScan(t1)
1977 IndexScan(t2)
1978 not used hint:
1979 duplication hint:
1980 error hint:
1981
1982                QUERY PLAN                
1983 -----------------------------------------
1984  Nested Loop
1985    ->  Tid Scan on t1
1986          TID Cond: (ctid = '(1,1)'::tid)
1987    ->  Index Scan using t2_pkey on t2
1988          Index Cond: (id = t1.id)
1989          Filter: (ctid = '(1,1)'::tid)
1990 (6 rows)
1991
1992 /*+TidScan(t1) BitmapScan(t2)*/
1993 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1994 LOG:  pg_hint_plan:
1995 used hint:
1996 TidScan(t1)
1997 BitmapScan(t2)
1998 not used hint:
1999 duplication hint:
2000 error hint:
2001
2002                 QUERY PLAN                
2003 ------------------------------------------
2004  Nested Loop
2005    ->  Tid Scan on t1
2006          TID Cond: (ctid = '(1,1)'::tid)
2007    ->  Bitmap Heap Scan on t2
2008          Recheck Cond: (id = t1.id)
2009          Filter: (ctid = '(1,1)'::tid)
2010          ->  Bitmap Index Scan on t2_pkey
2011                Index Cond: (id = t1.id)
2012 (8 rows)
2013
2014 /*+TidScan(t1) TidScan(t2)*/
2015 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2016 LOG:  pg_hint_plan:
2017 used hint:
2018 TidScan(t1)
2019 TidScan(t2)
2020 not used hint:
2021 duplication hint:
2022 error hint:
2023
2024                QUERY PLAN                
2025 -----------------------------------------
2026  Nested Loop
2027    Join Filter: (t1.id = t2.id)
2028    ->  Tid Scan on t1
2029          TID Cond: (ctid = '(1,1)'::tid)
2030    ->  Tid Scan on t2
2031          TID Cond: (ctid = '(1,1)'::tid)
2032 (6 rows)
2033
2034 /*+TidScan(t1) NoSeqScan(t2)*/
2035 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2036 LOG:  pg_hint_plan:
2037 used hint:
2038 TidScan(t1)
2039 NoSeqScan(t2)
2040 not used hint:
2041 duplication hint:
2042 error hint:
2043
2044                QUERY PLAN                
2045 -----------------------------------------
2046  Nested Loop
2047    Join Filter: (t1.id = t2.id)
2048    ->  Tid Scan on t1
2049          TID Cond: (ctid = '(1,1)'::tid)
2050    ->  Tid Scan on t2
2051          TID Cond: (ctid = '(1,1)'::tid)
2052 (6 rows)
2053
2054 /*+TidScan(t1) NoIndexScan(t2)*/
2055 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2056 LOG:  pg_hint_plan:
2057 used hint:
2058 TidScan(t1)
2059 NoIndexScan(t2)
2060 not used hint:
2061 duplication hint:
2062 error hint:
2063
2064                QUERY PLAN                
2065 -----------------------------------------
2066  Nested Loop
2067    Join Filter: (t1.id = t2.id)
2068    ->  Tid Scan on t1
2069          TID Cond: (ctid = '(1,1)'::tid)
2070    ->  Tid Scan on t2
2071          TID Cond: (ctid = '(1,1)'::tid)
2072 (6 rows)
2073
2074 /*+TidScan(t1) NoBitmapScan(t2)*/
2075 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2076 LOG:  pg_hint_plan:
2077 used hint:
2078 TidScan(t1)
2079 NoBitmapScan(t2)
2080 not used hint:
2081 duplication hint:
2082 error hint:
2083
2084                QUERY PLAN                
2085 -----------------------------------------
2086  Nested Loop
2087    Join Filter: (t1.id = t2.id)
2088    ->  Tid Scan on t1
2089          TID Cond: (ctid = '(1,1)'::tid)
2090    ->  Tid Scan on t2
2091          TID Cond: (ctid = '(1,1)'::tid)
2092 (6 rows)
2093
2094 /*+TidScan(t1) NoTidScan(t2)*/
2095 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2096 LOG:  pg_hint_plan:
2097 used hint:
2098 TidScan(t1)
2099 NoTidScan(t2)
2100 not used hint:
2101 duplication hint:
2102 error hint:
2103
2104                QUERY PLAN                
2105 -----------------------------------------
2106  Nested Loop
2107    ->  Tid Scan on t1
2108          TID Cond: (ctid = '(1,1)'::tid)
2109    ->  Index Scan using t2_pkey on t2
2110          Index Cond: (id = t1.id)
2111          Filter: (ctid = '(1,1)'::tid)
2112 (6 rows)
2113
2114 /*+NoSeqScan(t1)*/
2115 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2116 LOG:  pg_hint_plan:
2117 used hint:
2118 NoSeqScan(t1)
2119 not used hint:
2120 duplication hint:
2121 error hint:
2122
2123                QUERY PLAN                
2124 -----------------------------------------
2125  Nested Loop
2126    Join Filter: (t1.id = t2.id)
2127    ->  Tid Scan on t1
2128          TID Cond: (ctid = '(1,1)'::tid)
2129    ->  Tid Scan on t2
2130          TID Cond: (ctid = '(1,1)'::tid)
2131 (6 rows)
2132
2133 /*+NoSeqScan(t2)*/
2134 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2135 LOG:  pg_hint_plan:
2136 used hint:
2137 NoSeqScan(t2)
2138 not used hint:
2139 duplication hint:
2140 error hint:
2141
2142                QUERY PLAN                
2143 -----------------------------------------
2144  Nested Loop
2145    Join Filter: (t1.id = t2.id)
2146    ->  Tid Scan on t1
2147          TID Cond: (ctid = '(1,1)'::tid)
2148    ->  Tid Scan on t2
2149          TID Cond: (ctid = '(1,1)'::tid)
2150 (6 rows)
2151
2152 /*+NoSeqScan(t1) SeqScan(t2)*/
2153 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2154 LOG:  pg_hint_plan:
2155 used hint:
2156 NoSeqScan(t1)
2157 SeqScan(t2)
2158 not used hint:
2159 duplication hint:
2160 error hint:
2161
2162                QUERY PLAN                
2163 -----------------------------------------
2164  Nested Loop
2165    Join Filter: (t1.id = t2.id)
2166    ->  Tid Scan on t1
2167          TID Cond: (ctid = '(1,1)'::tid)
2168    ->  Seq Scan on t2
2169          Filter: (ctid = '(1,1)'::tid)
2170 (6 rows)
2171
2172 /*+NoSeqScan(t1) IndexScan(t2)*/
2173 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2174 LOG:  pg_hint_plan:
2175 used hint:
2176 NoSeqScan(t1)
2177 IndexScan(t2)
2178 not used hint:
2179 duplication hint:
2180 error hint:
2181
2182                QUERY PLAN                
2183 -----------------------------------------
2184  Nested Loop
2185    ->  Tid Scan on t1
2186          TID Cond: (ctid = '(1,1)'::tid)
2187    ->  Index Scan using t2_pkey on t2
2188          Index Cond: (id = t1.id)
2189          Filter: (ctid = '(1,1)'::tid)
2190 (6 rows)
2191
2192 /*+NoSeqScan(t1) BitmapScan(t2)*/
2193 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2194 LOG:  pg_hint_plan:
2195 used hint:
2196 NoSeqScan(t1)
2197 BitmapScan(t2)
2198 not used hint:
2199 duplication hint:
2200 error hint:
2201
2202                 QUERY PLAN                
2203 ------------------------------------------
2204  Nested Loop
2205    ->  Tid Scan on t1
2206          TID Cond: (ctid = '(1,1)'::tid)
2207    ->  Bitmap Heap Scan on t2
2208          Recheck Cond: (id = t1.id)
2209          Filter: (ctid = '(1,1)'::tid)
2210          ->  Bitmap Index Scan on t2_pkey
2211                Index Cond: (id = t1.id)
2212 (8 rows)
2213
2214 /*+NoSeqScan(t1) TidScan(t2)*/
2215 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2216 LOG:  pg_hint_plan:
2217 used hint:
2218 NoSeqScan(t1)
2219 TidScan(t2)
2220 not used hint:
2221 duplication hint:
2222 error hint:
2223
2224                QUERY PLAN                
2225 -----------------------------------------
2226  Nested Loop
2227    Join Filter: (t1.id = t2.id)
2228    ->  Tid Scan on t1
2229          TID Cond: (ctid = '(1,1)'::tid)
2230    ->  Tid Scan on t2
2231          TID Cond: (ctid = '(1,1)'::tid)
2232 (6 rows)
2233
2234 /*+NoSeqScan(t1) NoSeqScan(t2)*/
2235 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2236 LOG:  pg_hint_plan:
2237 used hint:
2238 NoSeqScan(t1)
2239 NoSeqScan(t2)
2240 not used hint:
2241 duplication hint:
2242 error hint:
2243
2244                QUERY PLAN                
2245 -----------------------------------------
2246  Nested Loop
2247    Join Filter: (t1.id = t2.id)
2248    ->  Tid Scan on t1
2249          TID Cond: (ctid = '(1,1)'::tid)
2250    ->  Tid Scan on t2
2251          TID Cond: (ctid = '(1,1)'::tid)
2252 (6 rows)
2253
2254 /*+NoSeqScan(t1) NoIndexScan(t2)*/
2255 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2256 LOG:  pg_hint_plan:
2257 used hint:
2258 NoSeqScan(t1)
2259 NoIndexScan(t2)
2260 not used hint:
2261 duplication hint:
2262 error hint:
2263
2264                QUERY PLAN                
2265 -----------------------------------------
2266  Nested Loop
2267    Join Filter: (t1.id = t2.id)
2268    ->  Tid Scan on t1
2269          TID Cond: (ctid = '(1,1)'::tid)
2270    ->  Tid Scan on t2
2271          TID Cond: (ctid = '(1,1)'::tid)
2272 (6 rows)
2273
2274 /*+NoSeqScan(t1) NoBitmapScan(t2)*/
2275 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2276 LOG:  pg_hint_plan:
2277 used hint:
2278 NoSeqScan(t1)
2279 NoBitmapScan(t2)
2280 not used hint:
2281 duplication hint:
2282 error hint:
2283
2284                QUERY PLAN                
2285 -----------------------------------------
2286  Nested Loop
2287    Join Filter: (t1.id = t2.id)
2288    ->  Tid Scan on t1
2289          TID Cond: (ctid = '(1,1)'::tid)
2290    ->  Tid Scan on t2
2291          TID Cond: (ctid = '(1,1)'::tid)
2292 (6 rows)
2293
2294 /*+NoSeqScan(t1) NoTidScan(t2)*/
2295 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2296 LOG:  pg_hint_plan:
2297 used hint:
2298 NoSeqScan(t1)
2299 NoTidScan(t2)
2300 not used hint:
2301 duplication hint:
2302 error hint:
2303
2304                QUERY PLAN                
2305 -----------------------------------------
2306  Nested Loop
2307    ->  Tid Scan on t1
2308          TID Cond: (ctid = '(1,1)'::tid)
2309    ->  Index Scan using t2_pkey on t2
2310          Index Cond: (id = t1.id)
2311          Filter: (ctid = '(1,1)'::tid)
2312 (6 rows)
2313
2314 /*+NoIndexScan(t1)*/
2315 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2316 LOG:  pg_hint_plan:
2317 used hint:
2318 NoIndexScan(t1)
2319 not used hint:
2320 duplication hint:
2321 error hint:
2322
2323                QUERY PLAN                
2324 -----------------------------------------
2325  Nested Loop
2326    Join Filter: (t1.id = t2.id)
2327    ->  Tid Scan on t1
2328          TID Cond: (ctid = '(1,1)'::tid)
2329    ->  Tid Scan on t2
2330          TID Cond: (ctid = '(1,1)'::tid)
2331 (6 rows)
2332
2333 /*+NoIndexScan(t2)*/
2334 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2335 LOG:  pg_hint_plan:
2336 used hint:
2337 NoIndexScan(t2)
2338 not used hint:
2339 duplication hint:
2340 error hint:
2341
2342                QUERY PLAN                
2343 -----------------------------------------
2344  Nested Loop
2345    Join Filter: (t1.id = t2.id)
2346    ->  Tid Scan on t1
2347          TID Cond: (ctid = '(1,1)'::tid)
2348    ->  Tid Scan on t2
2349          TID Cond: (ctid = '(1,1)'::tid)
2350 (6 rows)
2351
2352 /*+NoIndexScan(t1) SeqScan(t2)*/
2353 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2354 LOG:  pg_hint_plan:
2355 used hint:
2356 NoIndexScan(t1)
2357 SeqScan(t2)
2358 not used hint:
2359 duplication hint:
2360 error hint:
2361
2362                QUERY PLAN                
2363 -----------------------------------------
2364  Nested Loop
2365    Join Filter: (t1.id = t2.id)
2366    ->  Tid Scan on t1
2367          TID Cond: (ctid = '(1,1)'::tid)
2368    ->  Seq Scan on t2
2369          Filter: (ctid = '(1,1)'::tid)
2370 (6 rows)
2371
2372 /*+NoIndexScan(t1) IndexScan(t2)*/
2373 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2374 LOG:  pg_hint_plan:
2375 used hint:
2376 NoIndexScan(t1)
2377 IndexScan(t2)
2378 not used hint:
2379 duplication hint:
2380 error hint:
2381
2382                QUERY PLAN                
2383 -----------------------------------------
2384  Nested Loop
2385    ->  Tid Scan on t1
2386          TID Cond: (ctid = '(1,1)'::tid)
2387    ->  Index Scan using t2_pkey on t2
2388          Index Cond: (id = t1.id)
2389          Filter: (ctid = '(1,1)'::tid)
2390 (6 rows)
2391
2392 /*+NoIndexScan(t1) BitmapScan(t2)*/
2393 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2394 LOG:  pg_hint_plan:
2395 used hint:
2396 NoIndexScan(t1)
2397 BitmapScan(t2)
2398 not used hint:
2399 duplication hint:
2400 error hint:
2401
2402                 QUERY PLAN                
2403 ------------------------------------------
2404  Nested Loop
2405    ->  Tid Scan on t1
2406          TID Cond: (ctid = '(1,1)'::tid)
2407    ->  Bitmap Heap Scan on t2
2408          Recheck Cond: (id = t1.id)
2409          Filter: (ctid = '(1,1)'::tid)
2410          ->  Bitmap Index Scan on t2_pkey
2411                Index Cond: (id = t1.id)
2412 (8 rows)
2413
2414 /*+NoIndexScan(t1) TidScan(t2)*/
2415 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2416 LOG:  pg_hint_plan:
2417 used hint:
2418 NoIndexScan(t1)
2419 TidScan(t2)
2420 not used hint:
2421 duplication hint:
2422 error hint:
2423
2424                QUERY PLAN                
2425 -----------------------------------------
2426  Nested Loop
2427    Join Filter: (t1.id = t2.id)
2428    ->  Tid Scan on t1
2429          TID Cond: (ctid = '(1,1)'::tid)
2430    ->  Tid Scan on t2
2431          TID Cond: (ctid = '(1,1)'::tid)
2432 (6 rows)
2433
2434 /*+NoIndexScan(t1) NoSeqScan(t2)*/
2435 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2436 LOG:  pg_hint_plan:
2437 used hint:
2438 NoIndexScan(t1)
2439 NoSeqScan(t2)
2440 not used hint:
2441 duplication hint:
2442 error hint:
2443
2444                QUERY PLAN                
2445 -----------------------------------------
2446  Nested Loop
2447    Join Filter: (t1.id = t2.id)
2448    ->  Tid Scan on t1
2449          TID Cond: (ctid = '(1,1)'::tid)
2450    ->  Tid Scan on t2
2451          TID Cond: (ctid = '(1,1)'::tid)
2452 (6 rows)
2453
2454 /*+NoIndexScan(t1) NoIndexScan(t2)*/
2455 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2456 LOG:  pg_hint_plan:
2457 used hint:
2458 NoIndexScan(t1)
2459 NoIndexScan(t2)
2460 not used hint:
2461 duplication hint:
2462 error hint:
2463
2464                QUERY PLAN                
2465 -----------------------------------------
2466  Nested Loop
2467    Join Filter: (t1.id = t2.id)
2468    ->  Tid Scan on t1
2469          TID Cond: (ctid = '(1,1)'::tid)
2470    ->  Tid Scan on t2
2471          TID Cond: (ctid = '(1,1)'::tid)
2472 (6 rows)
2473
2474 /*+NoIndexScan(t1) NoBitmapScan(t2)*/
2475 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2476 LOG:  pg_hint_plan:
2477 used hint:
2478 NoIndexScan(t1)
2479 NoBitmapScan(t2)
2480 not used hint:
2481 duplication hint:
2482 error hint:
2483
2484                QUERY PLAN                
2485 -----------------------------------------
2486  Nested Loop
2487    Join Filter: (t1.id = t2.id)
2488    ->  Tid Scan on t1
2489          TID Cond: (ctid = '(1,1)'::tid)
2490    ->  Tid Scan on t2
2491          TID Cond: (ctid = '(1,1)'::tid)
2492 (6 rows)
2493
2494 /*+NoIndexScan(t1) NoTidScan(t2)*/
2495 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2496 LOG:  pg_hint_plan:
2497 used hint:
2498 NoIndexScan(t1)
2499 NoTidScan(t2)
2500 not used hint:
2501 duplication hint:
2502 error hint:
2503
2504                QUERY PLAN                
2505 -----------------------------------------
2506  Nested Loop
2507    ->  Tid Scan on t1
2508          TID Cond: (ctid = '(1,1)'::tid)
2509    ->  Index Scan using t2_pkey on t2
2510          Index Cond: (id = t1.id)
2511          Filter: (ctid = '(1,1)'::tid)
2512 (6 rows)
2513
2514 /*+NoBitmapScan(t1)*/
2515 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2516 LOG:  pg_hint_plan:
2517 used hint:
2518 NoBitmapScan(t1)
2519 not used hint:
2520 duplication hint:
2521 error hint:
2522
2523                QUERY PLAN                
2524 -----------------------------------------
2525  Nested Loop
2526    Join Filter: (t1.id = t2.id)
2527    ->  Tid Scan on t1
2528          TID Cond: (ctid = '(1,1)'::tid)
2529    ->  Tid Scan on t2
2530          TID Cond: (ctid = '(1,1)'::tid)
2531 (6 rows)
2532
2533 /*+NoBitmapScan(t2)*/
2534 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2535 LOG:  pg_hint_plan:
2536 used hint:
2537 NoBitmapScan(t2)
2538 not used hint:
2539 duplication hint:
2540 error hint:
2541
2542                QUERY PLAN                
2543 -----------------------------------------
2544  Nested Loop
2545    Join Filter: (t1.id = t2.id)
2546    ->  Tid Scan on t1
2547          TID Cond: (ctid = '(1,1)'::tid)
2548    ->  Tid Scan on t2
2549          TID Cond: (ctid = '(1,1)'::tid)
2550 (6 rows)
2551
2552 /*+NoBitmapScan(t1) SeqScan(t2)*/
2553 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2554 LOG:  pg_hint_plan:
2555 used hint:
2556 NoBitmapScan(t1)
2557 SeqScan(t2)
2558 not used hint:
2559 duplication hint:
2560 error hint:
2561
2562                QUERY PLAN                
2563 -----------------------------------------
2564  Nested Loop
2565    Join Filter: (t1.id = t2.id)
2566    ->  Tid Scan on t1
2567          TID Cond: (ctid = '(1,1)'::tid)
2568    ->  Seq Scan on t2
2569          Filter: (ctid = '(1,1)'::tid)
2570 (6 rows)
2571
2572 /*+NoBitmapScan(t1) IndexScan(t2)*/
2573 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2574 LOG:  pg_hint_plan:
2575 used hint:
2576 NoBitmapScan(t1)
2577 IndexScan(t2)
2578 not used hint:
2579 duplication hint:
2580 error hint:
2581
2582                QUERY PLAN                
2583 -----------------------------------------
2584  Nested Loop
2585    ->  Tid Scan on t1
2586          TID Cond: (ctid = '(1,1)'::tid)
2587    ->  Index Scan using t2_pkey on t2
2588          Index Cond: (id = t1.id)
2589          Filter: (ctid = '(1,1)'::tid)
2590 (6 rows)
2591
2592 /*+NoBitmapScan(t1) BitmapScan(t2)*/
2593 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2594 LOG:  pg_hint_plan:
2595 used hint:
2596 NoBitmapScan(t1)
2597 BitmapScan(t2)
2598 not used hint:
2599 duplication hint:
2600 error hint:
2601
2602                 QUERY PLAN                
2603 ------------------------------------------
2604  Nested Loop
2605    ->  Tid Scan on t1
2606          TID Cond: (ctid = '(1,1)'::tid)
2607    ->  Bitmap Heap Scan on t2
2608          Recheck Cond: (id = t1.id)
2609          Filter: (ctid = '(1,1)'::tid)
2610          ->  Bitmap Index Scan on t2_pkey
2611                Index Cond: (id = t1.id)
2612 (8 rows)
2613
2614 /*+NoBitmapScan(t1) TidScan(t2)*/
2615 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2616 LOG:  pg_hint_plan:
2617 used hint:
2618 NoBitmapScan(t1)
2619 TidScan(t2)
2620 not used hint:
2621 duplication hint:
2622 error hint:
2623
2624                QUERY PLAN                
2625 -----------------------------------------
2626  Nested Loop
2627    Join Filter: (t1.id = t2.id)
2628    ->  Tid Scan on t1
2629          TID Cond: (ctid = '(1,1)'::tid)
2630    ->  Tid Scan on t2
2631          TID Cond: (ctid = '(1,1)'::tid)
2632 (6 rows)
2633
2634 /*+NoBitmapScan(t1) NoSeqScan(t2)*/
2635 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2636 LOG:  pg_hint_plan:
2637 used hint:
2638 NoBitmapScan(t1)
2639 NoSeqScan(t2)
2640 not used hint:
2641 duplication hint:
2642 error hint:
2643
2644                QUERY PLAN                
2645 -----------------------------------------
2646  Nested Loop
2647    Join Filter: (t1.id = t2.id)
2648    ->  Tid Scan on t1
2649          TID Cond: (ctid = '(1,1)'::tid)
2650    ->  Tid Scan on t2
2651          TID Cond: (ctid = '(1,1)'::tid)
2652 (6 rows)
2653
2654 /*+NoBitmapScan(t1) NoIndexScan(t2)*/
2655 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2656 LOG:  pg_hint_plan:
2657 used hint:
2658 NoBitmapScan(t1)
2659 NoIndexScan(t2)
2660 not used hint:
2661 duplication hint:
2662 error hint:
2663
2664                QUERY PLAN                
2665 -----------------------------------------
2666  Nested Loop
2667    Join Filter: (t1.id = t2.id)
2668    ->  Tid Scan on t1
2669          TID Cond: (ctid = '(1,1)'::tid)
2670    ->  Tid Scan on t2
2671          TID Cond: (ctid = '(1,1)'::tid)
2672 (6 rows)
2673
2674 /*+NoBitmapScan(t1) NoBitmapScan(t2)*/
2675 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2676 LOG:  pg_hint_plan:
2677 used hint:
2678 NoBitmapScan(t1)
2679 NoBitmapScan(t2)
2680 not used hint:
2681 duplication hint:
2682 error hint:
2683
2684                QUERY PLAN                
2685 -----------------------------------------
2686  Nested Loop
2687    Join Filter: (t1.id = t2.id)
2688    ->  Tid Scan on t1
2689          TID Cond: (ctid = '(1,1)'::tid)
2690    ->  Tid Scan on t2
2691          TID Cond: (ctid = '(1,1)'::tid)
2692 (6 rows)
2693
2694 /*+NoBitmapScan(t1) NoTidScan(t2)*/
2695 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2696 LOG:  pg_hint_plan:
2697 used hint:
2698 NoBitmapScan(t1)
2699 NoTidScan(t2)
2700 not used hint:
2701 duplication hint:
2702 error hint:
2703
2704                QUERY PLAN                
2705 -----------------------------------------
2706  Nested Loop
2707    ->  Tid Scan on t1
2708          TID Cond: (ctid = '(1,1)'::tid)
2709    ->  Index Scan using t2_pkey on t2
2710          Index Cond: (id = t1.id)
2711          Filter: (ctid = '(1,1)'::tid)
2712 (6 rows)
2713
2714 /*+NoTidScan(t1)*/
2715 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2716 LOG:  pg_hint_plan:
2717 used hint:
2718 NoTidScan(t1)
2719 not used hint:
2720 duplication hint:
2721 error hint:
2722
2723                QUERY PLAN                
2724 -----------------------------------------
2725  Nested Loop
2726    ->  Tid Scan on t2
2727          TID Cond: (ctid = '(1,1)'::tid)
2728    ->  Index Scan using t1_pkey on t1
2729          Index Cond: (id = t2.id)
2730          Filter: (ctid = '(1,1)'::tid)
2731 (6 rows)
2732
2733 /*+NoTidScan(t2)*/
2734 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2735 LOG:  pg_hint_plan:
2736 used hint:
2737 NoTidScan(t2)
2738 not used hint:
2739 duplication hint:
2740 error hint:
2741
2742                QUERY PLAN                
2743 -----------------------------------------
2744  Nested Loop
2745    ->  Tid Scan on t1
2746          TID Cond: (ctid = '(1,1)'::tid)
2747    ->  Index Scan using t2_pkey on t2
2748          Index Cond: (id = t1.id)
2749          Filter: (ctid = '(1,1)'::tid)
2750 (6 rows)
2751
2752 /*+NoTidScan(t1) SeqScan(t2)*/
2753 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2754 LOG:  pg_hint_plan:
2755 used hint:
2756 NoTidScan(t1)
2757 SeqScan(t2)
2758 not used hint:
2759 duplication hint:
2760 error hint:
2761
2762               QUERY PLAN               
2763 ---------------------------------------
2764  Nested Loop
2765    ->  Seq Scan on t2
2766          Filter: (ctid = '(1,1)'::tid)
2767    ->  Index Scan using t1_pkey on t1
2768          Index Cond: (id = t2.id)
2769          Filter: (ctid = '(1,1)'::tid)
2770 (6 rows)
2771
2772 /*+NoTidScan(t1) IndexScan(t2)*/
2773 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2774 LOG:  pg_hint_plan:
2775 used hint:
2776 NoTidScan(t1)
2777 IndexScan(t2)
2778 not used hint:
2779 duplication hint:
2780 error hint:
2781
2782               QUERY PLAN               
2783 ---------------------------------------
2784  Nested Loop
2785    ->  Index Scan using t2_pkey on t2
2786          Filter: (ctid = '(1,1)'::tid)
2787    ->  Index Scan using t1_pkey on t1
2788          Index Cond: (id = t2.id)
2789          Filter: (ctid = '(1,1)'::tid)
2790 (6 rows)
2791
2792 /*+NoTidScan(t1) BitmapScan(t2)*/
2793 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2794 LOG:  pg_hint_plan:
2795 used hint:
2796 NoTidScan(t1)
2797 BitmapScan(t2)
2798 not used hint:
2799 duplication hint:
2800 error hint:
2801
2802                 QUERY PLAN                
2803 ------------------------------------------
2804  Nested Loop
2805    ->  Seq Scan on t1
2806          Filter: (ctid = '(1,1)'::tid)
2807    ->  Bitmap Heap Scan on t2
2808          Recheck Cond: (id = t1.id)
2809          Filter: (ctid = '(1,1)'::tid)
2810          ->  Bitmap Index Scan on t2_pkey
2811                Index Cond: (id = t1.id)
2812 (8 rows)
2813
2814 /*+NoTidScan(t1) TidScan(t2)*/
2815 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2816 LOG:  pg_hint_plan:
2817 used hint:
2818 NoTidScan(t1)
2819 TidScan(t2)
2820 not used hint:
2821 duplication hint:
2822 error hint:
2823
2824                QUERY PLAN                
2825 -----------------------------------------
2826  Nested Loop
2827    ->  Tid Scan on t2
2828          TID Cond: (ctid = '(1,1)'::tid)
2829    ->  Index Scan using t1_pkey on t1
2830          Index Cond: (id = t2.id)
2831          Filter: (ctid = '(1,1)'::tid)
2832 (6 rows)
2833
2834 /*+NoTidScan(t1) NoSeqScan(t2)*/
2835 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2836 LOG:  pg_hint_plan:
2837 used hint:
2838 NoTidScan(t1)
2839 NoSeqScan(t2)
2840 not used hint:
2841 duplication hint:
2842 error hint:
2843
2844                QUERY PLAN                
2845 -----------------------------------------
2846  Nested Loop
2847    ->  Tid Scan on t2
2848          TID Cond: (ctid = '(1,1)'::tid)
2849    ->  Index Scan using t1_pkey on t1
2850          Index Cond: (id = t2.id)
2851          Filter: (ctid = '(1,1)'::tid)
2852 (6 rows)
2853
2854 /*+NoTidScan(t1) NoIndexScan(t2)*/
2855 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2856 LOG:  pg_hint_plan:
2857 used hint:
2858 NoTidScan(t1)
2859 NoIndexScan(t2)
2860 not used hint:
2861 duplication hint:
2862 error hint:
2863
2864                QUERY PLAN                
2865 -----------------------------------------
2866  Nested Loop
2867    ->  Tid Scan on t2
2868          TID Cond: (ctid = '(1,1)'::tid)
2869    ->  Index Scan using t1_pkey on t1
2870          Index Cond: (id = t2.id)
2871          Filter: (ctid = '(1,1)'::tid)
2872 (6 rows)
2873
2874 /*+NoTidScan(t1) NoBitmapScan(t2)*/
2875 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2876 LOG:  pg_hint_plan:
2877 used hint:
2878 NoTidScan(t1)
2879 NoBitmapScan(t2)
2880 not used hint:
2881 duplication hint:
2882 error hint:
2883
2884                QUERY PLAN                
2885 -----------------------------------------
2886  Nested Loop
2887    ->  Tid Scan on t2
2888          TID Cond: (ctid = '(1,1)'::tid)
2889    ->  Index Scan using t1_pkey on t1
2890          Index Cond: (id = t2.id)
2891          Filter: (ctid = '(1,1)'::tid)
2892 (6 rows)
2893
2894 /*+NoTidScan(t1) NoTidScan(t2)*/
2895 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2896 LOG:  pg_hint_plan:
2897 used hint:
2898 NoTidScan(t1)
2899 NoTidScan(t2)
2900 not used hint:
2901 duplication hint:
2902 error hint:
2903
2904               QUERY PLAN               
2905 ---------------------------------------
2906  Nested Loop
2907    ->  Seq Scan on t2
2908          Filter: (ctid = '(1,1)'::tid)
2909    ->  Index Scan using t1_pkey on t1
2910          Index Cond: (id = t2.id)
2911          Filter: (ctid = '(1,1)'::tid)
2912 (6 rows)
2913
2914 -- additional test
2915 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;
2916                QUERY PLAN                
2917 -----------------------------------------
2918  Nested Loop
2919    Join Filter: (t1.id = t2.id)
2920    ->  Tid Scan on t1
2921          TID Cond: (ctid = '(1,1)'::tid)
2922          Filter: (id < 10)
2923    ->  Tid Scan on t2
2924          TID Cond: (ctid = '(1,1)'::tid)
2925          Filter: (id < 10)
2926 (8 rows)
2927
2928 /*+BitmapScan(t1) BitmapScan(t2)*/
2929 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;
2930 LOG:  pg_hint_plan:
2931 used hint:
2932 BitmapScan(t1)
2933 BitmapScan(t2)
2934 not used hint:
2935 duplication hint:
2936 error hint:
2937
2938                        QUERY PLAN                       
2939 --------------------------------------------------------
2940  Nested Loop
2941    ->  Bitmap Heap Scan on t2
2942          Recheck Cond: (id < 10)
2943          Filter: (ctid = '(1,1)'::tid)
2944          ->  Bitmap Index Scan on t2_pkey
2945                Index Cond: (id < 10)
2946    ->  Bitmap Heap Scan on t1
2947          Recheck Cond: ((id < 10) AND (id = t2.id))
2948          Filter: (ctid = '(1,1)'::tid)
2949          ->  Bitmap Index Scan on t1_pkey
2950                Index Cond: ((id < 10) AND (id = t2.id))
2951 (11 rows)
2952
2953 -- outer join test
2954 EXPLAIN (COSTS false) SELECT * FROM t1 FULL OUTER JOIN  t2 ON (t1.id = t2.id);
2955           QUERY PLAN          
2956 ------------------------------
2957  Hash Full Join
2958    Hash Cond: (t1.id = t2.id)
2959    ->  Seq Scan on t1
2960    ->  Hash
2961          ->  Seq Scan on t2
2962 (5 rows)
2963
2964 /*+MergeJoin(t1 t2)*/
2965 EXPLAIN (COSTS false) SELECT * FROM t1 FULL OUTER JOIN  t2 ON (t1.id = t2.id);
2966 LOG:  pg_hint_plan:
2967 used hint:
2968 MergeJoin(t1 t2)
2969 not used hint:
2970 duplication hint:
2971 error hint:
2972
2973               QUERY PLAN              
2974 --------------------------------------
2975  Merge Full Join
2976    Merge Cond: (t1.id = t2.id)
2977    ->  Index Scan using t1_pkey on t1
2978    ->  Index Scan using t2_pkey on t2
2979 (4 rows)
2980
2981 /*+NestLoop(t1 t2)*/
2982 EXPLAIN (COSTS false) SELECT * FROM t1 FULL OUTER JOIN  t2 ON (t1.id = t2.id);
2983 LOG:  pg_hint_plan:
2984 used hint:
2985 NestLoop(t1 t2)
2986 not used hint:
2987 duplication hint:
2988 error hint:
2989
2990           QUERY PLAN          
2991 ------------------------------
2992  Hash Full Join
2993    Hash Cond: (t1.id = t2.id)
2994    ->  Seq Scan on t1
2995    ->  Hash
2996          ->  Seq Scan on t2
2997 (5 rows)
2998
2999 -- inherite table test
3000 SET constraint_exclusion TO off;
3001 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3002                                  QUERY PLAN                                  
3003 -----------------------------------------------------------------------------
3004  Result
3005    ->  Append
3006          ->  Seq Scan on p1
3007                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3008          ->  Seq Scan on p1_c1 p1
3009                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3010          ->  Seq Scan on p1_c2 p1
3011                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3012          ->  Seq Scan on p1_c3 p1
3013                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3014          ->  Tid Scan on p1_c4 p1
3015                TID Cond: (ctid = '(1,1)'::tid)
3016                Filter: ((id >= 50) AND (id <= 51))
3017          ->  Tid Scan on p1_c1_c1 p1
3018                TID Cond: (ctid = '(1,1)'::tid)
3019                Filter: ((id >= 50) AND (id <= 51))
3020          ->  Tid Scan on p1_c1_c2 p1
3021                TID Cond: (ctid = '(1,1)'::tid)
3022                Filter: ((id >= 50) AND (id <= 51))
3023          ->  Tid Scan on p1_c3_c1 p1
3024                TID Cond: (ctid = '(1,1)'::tid)
3025                Filter: ((id >= 50) AND (id <= 51))
3026          ->  Tid Scan on p1_c3_c2 p1
3027                TID Cond: (ctid = '(1,1)'::tid)
3028                Filter: ((id >= 50) AND (id <= 51))
3029 (25 rows)
3030
3031 SET constraint_exclusion TO on;
3032 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3033                                  QUERY PLAN                                  
3034 -----------------------------------------------------------------------------
3035  Result
3036    ->  Append
3037          ->  Seq Scan on p1
3038                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3039          ->  Seq Scan on p1_c1 p1
3040                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3041          ->  Tid Scan on p1_c1_c1 p1
3042                TID Cond: (ctid = '(1,1)'::tid)
3043                Filter: ((id >= 50) AND (id <= 51))
3044          ->  Tid Scan on p1_c1_c2 p1
3045                TID Cond: (ctid = '(1,1)'::tid)
3046                Filter: ((id >= 50) AND (id <= 51))
3047 (12 rows)
3048
3049 SET constraint_exclusion TO off;
3050 /*+SeqScan(p1)*/
3051 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3052 LOG:  pg_hint_plan:
3053 used hint:
3054 SeqScan(p1)
3055 not used hint:
3056 duplication hint:
3057 error hint:
3058
3059                                  QUERY PLAN                                  
3060 -----------------------------------------------------------------------------
3061  Result
3062    ->  Append
3063          ->  Seq Scan on p1
3064                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3065          ->  Seq Scan on p1_c1 p1
3066                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3067          ->  Seq Scan on p1_c2 p1
3068                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3069          ->  Seq Scan on p1_c3 p1
3070                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3071          ->  Seq Scan on p1_c4 p1
3072                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3073          ->  Seq Scan on p1_c1_c1 p1
3074                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3075          ->  Seq Scan on p1_c1_c2 p1
3076                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3077          ->  Seq Scan on p1_c3_c1 p1
3078                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3079          ->  Seq Scan on p1_c3_c2 p1
3080                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3081 (20 rows)
3082
3083 /*+IndexScan(p1)*/
3084 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3085 LOG:  pg_hint_plan:
3086 used hint:
3087 IndexScan(p1)
3088 not used hint:
3089 duplication hint:
3090 error hint:
3091
3092                         QUERY PLAN                         
3093 -----------------------------------------------------------
3094  Result
3095    ->  Append
3096          ->  Index Scan using p1_pkey on p1
3097                Index Cond: ((id >= 50) AND (id <= 51))
3098                Filter: (ctid = '(1,1)'::tid)
3099          ->  Index Scan using p1_c1_pkey on p1_c1 p1
3100                Index Cond: ((id >= 50) AND (id <= 51))
3101                Filter: (ctid = '(1,1)'::tid)
3102          ->  Index Scan using p1_c2_pkey on p1_c2 p1
3103                Index Cond: ((id >= 50) AND (id <= 51))
3104                Filter: (ctid = '(1,1)'::tid)
3105          ->  Index Scan using p1_c3_pkey on p1_c3 p1
3106                Index Cond: ((id >= 50) AND (id <= 51))
3107                Filter: (ctid = '(1,1)'::tid)
3108          ->  Index Scan using p1_c4_pkey on p1_c4 p1
3109                Index Cond: ((id >= 50) AND (id <= 51))
3110                Filter: (ctid = '(1,1)'::tid)
3111          ->  Index Scan using p1_c1_c1_pkey on p1_c1_c1 p1
3112                Index Cond: ((id >= 50) AND (id <= 51))
3113                Filter: (ctid = '(1,1)'::tid)
3114          ->  Index Scan using p1_c1_c2_pkey on p1_c1_c2 p1
3115                Index Cond: ((id >= 50) AND (id <= 51))
3116                Filter: (ctid = '(1,1)'::tid)
3117          ->  Index Scan using p1_c3_c1_pkey on p1_c3_c1 p1
3118                Index Cond: ((id >= 50) AND (id <= 51))
3119                Filter: (ctid = '(1,1)'::tid)
3120          ->  Index Scan using p1_c3_c2_pkey on p1_c3_c2 p1
3121                Index Cond: ((id >= 50) AND (id <= 51))
3122                Filter: (ctid = '(1,1)'::tid)
3123 (29 rows)
3124
3125 /*+BitmapScan(p1)*/
3126 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3127 LOG:  pg_hint_plan:
3128 used hint:
3129 BitmapScan(p1)
3130 not used hint:
3131 duplication hint:
3132 error hint:
3133
3134                          QUERY PLAN                          
3135 -------------------------------------------------------------
3136  Result
3137    ->  Append
3138          ->  Bitmap Heap Scan on p1
3139                Recheck Cond: ((id >= 50) AND (id <= 51))
3140                Filter: (ctid = '(1,1)'::tid)
3141                ->  Bitmap Index Scan on p1_pkey
3142                      Index Cond: ((id >= 50) AND (id <= 51))
3143          ->  Bitmap Heap Scan on p1_c1 p1
3144                Recheck Cond: ((id >= 50) AND (id <= 51))
3145                Filter: (ctid = '(1,1)'::tid)
3146                ->  Bitmap Index Scan on p1_c1_pkey
3147                      Index Cond: ((id >= 50) AND (id <= 51))
3148          ->  Bitmap Heap Scan on p1_c2 p1
3149                Recheck Cond: ((id >= 50) AND (id <= 51))
3150                Filter: (ctid = '(1,1)'::tid)
3151                ->  Bitmap Index Scan on p1_c2_pkey
3152                      Index Cond: ((id >= 50) AND (id <= 51))
3153          ->  Bitmap Heap Scan on p1_c3 p1
3154                Recheck Cond: ((id >= 50) AND (id <= 51))
3155                Filter: (ctid = '(1,1)'::tid)
3156                ->  Bitmap Index Scan on p1_c3_pkey
3157                      Index Cond: ((id >= 50) AND (id <= 51))
3158          ->  Bitmap Heap Scan on p1_c4 p1
3159                Recheck Cond: ((id >= 50) AND (id <= 51))
3160                Filter: (ctid = '(1,1)'::tid)
3161                ->  Bitmap Index Scan on p1_c4_pkey
3162                      Index Cond: ((id >= 50) AND (id <= 51))
3163          ->  Bitmap Heap Scan on p1_c1_c1 p1
3164                Recheck Cond: ((id >= 50) AND (id <= 51))
3165                Filter: (ctid = '(1,1)'::tid)
3166                ->  Bitmap Index Scan on p1_c1_c1_pkey
3167                      Index Cond: ((id >= 50) AND (id <= 51))
3168          ->  Bitmap Heap Scan on p1_c1_c2 p1
3169                Recheck Cond: ((id >= 50) AND (id <= 51))
3170                Filter: (ctid = '(1,1)'::tid)
3171                ->  Bitmap Index Scan on p1_c1_c2_pkey
3172                      Index Cond: ((id >= 50) AND (id <= 51))
3173          ->  Bitmap Heap Scan on p1_c3_c1 p1
3174                Recheck Cond: ((id >= 50) AND (id <= 51))
3175                Filter: (ctid = '(1,1)'::tid)
3176                ->  Bitmap Index Scan on p1_c3_c1_pkey
3177                      Index Cond: ((id >= 50) AND (id <= 51))
3178          ->  Bitmap Heap Scan on p1_c3_c2 p1
3179                Recheck Cond: ((id >= 50) AND (id <= 51))
3180                Filter: (ctid = '(1,1)'::tid)
3181                ->  Bitmap Index Scan on p1_c3_c2_pkey
3182                      Index Cond: ((id >= 50) AND (id <= 51))
3183 (47 rows)
3184
3185 /*+TidScan(p1)*/
3186 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3187 LOG:  pg_hint_plan:
3188 used hint:
3189 TidScan(p1)
3190 not used hint:
3191 duplication hint:
3192 error hint:
3193
3194                     QUERY PLAN                     
3195 ---------------------------------------------------
3196  Result
3197    ->  Append
3198          ->  Tid Scan on p1
3199                TID Cond: (ctid = '(1,1)'::tid)
3200                Filter: ((id >= 50) AND (id <= 51))
3201          ->  Tid Scan on p1_c1 p1
3202                TID Cond: (ctid = '(1,1)'::tid)
3203                Filter: ((id >= 50) AND (id <= 51))
3204          ->  Tid Scan on p1_c2 p1
3205                TID Cond: (ctid = '(1,1)'::tid)
3206                Filter: ((id >= 50) AND (id <= 51))
3207          ->  Tid Scan on p1_c3 p1
3208                TID Cond: (ctid = '(1,1)'::tid)
3209                Filter: ((id >= 50) AND (id <= 51))
3210          ->  Tid Scan on p1_c4 p1
3211                TID Cond: (ctid = '(1,1)'::tid)
3212                Filter: ((id >= 50) AND (id <= 51))
3213          ->  Tid Scan on p1_c1_c1 p1
3214                TID Cond: (ctid = '(1,1)'::tid)
3215                Filter: ((id >= 50) AND (id <= 51))
3216          ->  Tid Scan on p1_c1_c2 p1
3217                TID Cond: (ctid = '(1,1)'::tid)
3218                Filter: ((id >= 50) AND (id <= 51))
3219          ->  Tid Scan on p1_c3_c1 p1
3220                TID Cond: (ctid = '(1,1)'::tid)
3221                Filter: ((id >= 50) AND (id <= 51))
3222          ->  Tid Scan on p1_c3_c2 p1
3223                TID Cond: (ctid = '(1,1)'::tid)
3224                Filter: ((id >= 50) AND (id <= 51))
3225 (29 rows)
3226
3227 SET constraint_exclusion TO on;
3228 /*+SeqScan(p1)*/
3229 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3230 LOG:  pg_hint_plan:
3231 used hint:
3232 SeqScan(p1)
3233 not used hint:
3234 duplication hint:
3235 error hint:
3236
3237                                  QUERY PLAN                                  
3238 -----------------------------------------------------------------------------
3239  Result
3240    ->  Append
3241          ->  Seq Scan on p1
3242                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3243          ->  Seq Scan on p1_c1 p1
3244                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3245          ->  Seq Scan on p1_c1_c1 p1
3246                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3247          ->  Seq Scan on p1_c1_c2 p1
3248                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3249 (10 rows)
3250
3251 /*+IndexScan(p1)*/
3252 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3253 LOG:  pg_hint_plan:
3254 used hint:
3255 IndexScan(p1)
3256 not used hint:
3257 duplication hint:
3258 error hint:
3259
3260                         QUERY PLAN                         
3261 -----------------------------------------------------------
3262  Result
3263    ->  Append
3264          ->  Index Scan using p1_pkey on p1
3265                Index Cond: ((id >= 50) AND (id <= 51))
3266                Filter: (ctid = '(1,1)'::tid)
3267          ->  Index Scan using p1_c1_pkey on p1_c1 p1
3268                Index Cond: ((id >= 50) AND (id <= 51))
3269                Filter: (ctid = '(1,1)'::tid)
3270          ->  Index Scan using p1_c1_c1_pkey on p1_c1_c1 p1
3271                Index Cond: ((id >= 50) AND (id <= 51))
3272                Filter: (ctid = '(1,1)'::tid)
3273          ->  Index Scan using p1_c1_c2_pkey on p1_c1_c2 p1
3274                Index Cond: ((id >= 50) AND (id <= 51))
3275                Filter: (ctid = '(1,1)'::tid)
3276 (14 rows)
3277
3278 /*+BitmapScan(p1)*/
3279 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3280 LOG:  pg_hint_plan:
3281 used hint:
3282 BitmapScan(p1)
3283 not used hint:
3284 duplication hint:
3285 error hint:
3286
3287                          QUERY PLAN                          
3288 -------------------------------------------------------------
3289  Result
3290    ->  Append
3291          ->  Bitmap Heap Scan on p1
3292                Recheck Cond: ((id >= 50) AND (id <= 51))
3293                Filter: (ctid = '(1,1)'::tid)
3294                ->  Bitmap Index Scan on p1_pkey
3295                      Index Cond: ((id >= 50) AND (id <= 51))
3296          ->  Bitmap Heap Scan on p1_c1 p1
3297                Recheck Cond: ((id >= 50) AND (id <= 51))
3298                Filter: (ctid = '(1,1)'::tid)
3299                ->  Bitmap Index Scan on p1_c1_pkey
3300                      Index Cond: ((id >= 50) AND (id <= 51))
3301          ->  Bitmap Heap Scan on p1_c1_c1 p1
3302                Recheck Cond: ((id >= 50) AND (id <= 51))
3303                Filter: (ctid = '(1,1)'::tid)
3304                ->  Bitmap Index Scan on p1_c1_c1_pkey
3305                      Index Cond: ((id >= 50) AND (id <= 51))
3306          ->  Bitmap Heap Scan on p1_c1_c2 p1
3307                Recheck Cond: ((id >= 50) AND (id <= 51))
3308                Filter: (ctid = '(1,1)'::tid)
3309                ->  Bitmap Index Scan on p1_c1_c2_pkey
3310                      Index Cond: ((id >= 50) AND (id <= 51))
3311 (22 rows)
3312
3313 /*+TidScan(p1)*/
3314 EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3315 LOG:  pg_hint_plan:
3316 used hint:
3317 TidScan(p1)
3318 not used hint:
3319 duplication hint:
3320 error hint:
3321
3322                     QUERY PLAN                     
3323 ---------------------------------------------------
3324  Result
3325    ->  Append
3326          ->  Tid Scan on p1
3327                TID Cond: (ctid = '(1,1)'::tid)
3328                Filter: ((id >= 50) AND (id <= 51))
3329          ->  Tid Scan on p1_c1 p1
3330                TID Cond: (ctid = '(1,1)'::tid)
3331                Filter: ((id >= 50) AND (id <= 51))
3332          ->  Tid Scan on p1_c1_c1 p1
3333                TID Cond: (ctid = '(1,1)'::tid)
3334                Filter: ((id >= 50) AND (id <= 51))
3335          ->  Tid Scan on p1_c1_c2 p1
3336                TID Cond: (ctid = '(1,1)'::tid)
3337                Filter: ((id >= 50) AND (id <= 51))
3338 (14 rows)
3339
3340 SET constraint_exclusion TO off;
3341 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;
3342                                     QUERY PLAN                                     
3343 -----------------------------------------------------------------------------------
3344  Merge Join
3345    Merge Cond: (public.p1.id = t1.id)
3346    ->  Sort
3347          Sort Key: public.p1.id
3348          ->  Append
3349                ->  Seq Scan on p1
3350                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3351                ->  Seq Scan on p1_c1 p1
3352                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3353                ->  Seq Scan on p1_c2 p1
3354                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3355                ->  Seq Scan on p1_c3 p1
3356                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3357                ->  Tid Scan on p1_c4 p1
3358                      TID Cond: (ctid = '(1,1)'::tid)
3359                      Filter: ((id >= 50) AND (id <= 51))
3360                ->  Tid Scan on p1_c1_c1 p1
3361                      TID Cond: (ctid = '(1,1)'::tid)
3362                      Filter: ((id >= 50) AND (id <= 51))
3363                ->  Tid Scan on p1_c1_c2 p1
3364                      TID Cond: (ctid = '(1,1)'::tid)
3365                      Filter: ((id >= 50) AND (id <= 51))
3366                ->  Tid Scan on p1_c3_c1 p1
3367                      TID Cond: (ctid = '(1,1)'::tid)
3368                      Filter: ((id >= 50) AND (id <= 51))
3369                ->  Tid Scan on p1_c3_c2 p1
3370                      TID Cond: (ctid = '(1,1)'::tid)
3371                      Filter: ((id >= 50) AND (id <= 51))
3372    ->  Index Scan using t1_pkey on t1
3373          Index Cond: (id < 10)
3374 (30 rows)
3375
3376 SET constraint_exclusion TO on;
3377 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;
3378                                     QUERY PLAN                                     
3379 -----------------------------------------------------------------------------------
3380  Merge Join
3381    Merge Cond: (public.p1.id = t1.id)
3382    ->  Sort
3383          Sort Key: public.p1.id
3384          ->  Append
3385                ->  Seq Scan on p1
3386                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3387                ->  Seq Scan on p1_c1 p1
3388                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3389                ->  Tid Scan on p1_c1_c1 p1
3390                      TID Cond: (ctid = '(1,1)'::tid)
3391                      Filter: ((id >= 50) AND (id <= 51))
3392                ->  Tid Scan on p1_c1_c2 p1
3393                      TID Cond: (ctid = '(1,1)'::tid)
3394                      Filter: ((id >= 50) AND (id <= 51))
3395    ->  Index Scan using t1_pkey on t1
3396          Index Cond: (id < 10)
3397 (17 rows)
3398
3399 SET constraint_exclusion TO off;
3400 /*+SeqScan(p1)*/
3401 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;
3402 LOG:  pg_hint_plan:
3403 used hint:
3404 SeqScan(p1)
3405 not used hint:
3406 duplication hint:
3407 error hint:
3408
3409                                     QUERY PLAN                                     
3410 -----------------------------------------------------------------------------------
3411  Merge Join
3412    Merge Cond: (public.p1.id = t1.id)
3413    ->  Sort
3414          Sort Key: public.p1.id
3415          ->  Append
3416                ->  Seq Scan on p1
3417                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3418                ->  Seq Scan on p1_c1 p1
3419                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3420                ->  Seq Scan on p1_c2 p1
3421                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3422                ->  Seq Scan on p1_c3 p1
3423                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3424                ->  Tid Scan on p1_c4 p1
3425                      TID Cond: (ctid = '(1,1)'::tid)
3426                      Filter: ((id >= 50) AND (id <= 51))
3427                ->  Tid Scan on p1_c1_c1 p1
3428                      TID Cond: (ctid = '(1,1)'::tid)
3429                      Filter: ((id >= 50) AND (id <= 51))
3430                ->  Tid Scan on p1_c1_c2 p1
3431                      TID Cond: (ctid = '(1,1)'::tid)
3432                      Filter: ((id >= 50) AND (id <= 51))
3433                ->  Tid Scan on p1_c3_c1 p1
3434                      TID Cond: (ctid = '(1,1)'::tid)
3435                      Filter: ((id >= 50) AND (id <= 51))
3436                ->  Tid Scan on p1_c3_c2 p1
3437                      TID Cond: (ctid = '(1,1)'::tid)
3438                      Filter: ((id >= 50) AND (id <= 51))
3439    ->  Index Scan using t1_pkey on t1
3440          Index Cond: (id < 10)
3441 (30 rows)
3442
3443 /*+IndexScan(p1)*/
3444 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;
3445 LOG:  pg_hint_plan:
3446 used hint:
3447 IndexScan(p1)
3448 not used hint:
3449 duplication hint:
3450 error hint:
3451
3452                                     QUERY PLAN                                     
3453 -----------------------------------------------------------------------------------
3454  Merge Join
3455    Merge Cond: (public.p1.id = t1.id)
3456    ->  Sort
3457          Sort Key: public.p1.id
3458          ->  Append
3459                ->  Seq Scan on p1
3460                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3461                ->  Seq Scan on p1_c1 p1
3462                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3463                ->  Seq Scan on p1_c2 p1
3464                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3465                ->  Seq Scan on p1_c3 p1
3466                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3467                ->  Tid Scan on p1_c4 p1
3468                      TID Cond: (ctid = '(1,1)'::tid)
3469                      Filter: ((id >= 50) AND (id <= 51))
3470                ->  Tid Scan on p1_c1_c1 p1
3471                      TID Cond: (ctid = '(1,1)'::tid)
3472                      Filter: ((id >= 50) AND (id <= 51))
3473                ->  Tid Scan on p1_c1_c2 p1
3474                      TID Cond: (ctid = '(1,1)'::tid)
3475                      Filter: ((id >= 50) AND (id <= 51))
3476                ->  Tid Scan on p1_c3_c1 p1
3477                      TID Cond: (ctid = '(1,1)'::tid)
3478                      Filter: ((id >= 50) AND (id <= 51))
3479                ->  Tid Scan on p1_c3_c2 p1
3480                      TID Cond: (ctid = '(1,1)'::tid)
3481                      Filter: ((id >= 50) AND (id <= 51))
3482    ->  Index Scan using t1_pkey on t1
3483          Index Cond: (id < 10)
3484 (30 rows)
3485
3486 /*+BitmapScan(p1)*/
3487 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;
3488 LOG:  pg_hint_plan:
3489 used hint:
3490 BitmapScan(p1)
3491 not used hint:
3492 duplication hint:
3493 error hint:
3494
3495                                     QUERY PLAN                                     
3496 -----------------------------------------------------------------------------------
3497  Merge Join
3498    Merge Cond: (public.p1.id = t1.id)
3499    ->  Sort
3500          Sort Key: public.p1.id
3501          ->  Append
3502                ->  Seq Scan on p1
3503                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3504                ->  Seq Scan on p1_c1 p1
3505                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3506                ->  Seq Scan on p1_c2 p1
3507                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3508                ->  Seq Scan on p1_c3 p1
3509                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3510                ->  Tid Scan on p1_c4 p1
3511                      TID Cond: (ctid = '(1,1)'::tid)
3512                      Filter: ((id >= 50) AND (id <= 51))
3513                ->  Tid Scan on p1_c1_c1 p1
3514                      TID Cond: (ctid = '(1,1)'::tid)
3515                      Filter: ((id >= 50) AND (id <= 51))
3516                ->  Tid Scan on p1_c1_c2 p1
3517                      TID Cond: (ctid = '(1,1)'::tid)
3518                      Filter: ((id >= 50) AND (id <= 51))
3519                ->  Tid Scan on p1_c3_c1 p1
3520                      TID Cond: (ctid = '(1,1)'::tid)
3521                      Filter: ((id >= 50) AND (id <= 51))
3522                ->  Tid Scan on p1_c3_c2 p1
3523                      TID Cond: (ctid = '(1,1)'::tid)
3524                      Filter: ((id >= 50) AND (id <= 51))
3525    ->  Index Scan using t1_pkey on t1
3526          Index Cond: (id < 10)
3527 (30 rows)
3528
3529 /*+TidScan(p1)*/
3530 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;
3531 LOG:  pg_hint_plan:
3532 used hint:
3533 TidScan(p1)
3534 not used hint:
3535 duplication hint:
3536 error hint:
3537
3538                                     QUERY PLAN                                     
3539 -----------------------------------------------------------------------------------
3540  Merge Join
3541    Merge Cond: (public.p1.id = t1.id)
3542    ->  Sort
3543          Sort Key: public.p1.id
3544          ->  Append
3545                ->  Seq Scan on p1
3546                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3547                ->  Seq Scan on p1_c1 p1
3548                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3549                ->  Seq Scan on p1_c2 p1
3550                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3551                ->  Seq Scan on p1_c3 p1
3552                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3553                ->  Tid Scan on p1_c4 p1
3554                      TID Cond: (ctid = '(1,1)'::tid)
3555                      Filter: ((id >= 50) AND (id <= 51))
3556                ->  Tid Scan on p1_c1_c1 p1
3557                      TID Cond: (ctid = '(1,1)'::tid)
3558                      Filter: ((id >= 50) AND (id <= 51))
3559                ->  Tid Scan on p1_c1_c2 p1
3560                      TID Cond: (ctid = '(1,1)'::tid)
3561                      Filter: ((id >= 50) AND (id <= 51))
3562                ->  Tid Scan on p1_c3_c1 p1
3563                      TID Cond: (ctid = '(1,1)'::tid)
3564                      Filter: ((id >= 50) AND (id <= 51))
3565                ->  Tid Scan on p1_c3_c2 p1
3566                      TID Cond: (ctid = '(1,1)'::tid)
3567                      Filter: ((id >= 50) AND (id <= 51))
3568    ->  Index Scan using t1_pkey on t1
3569          Index Cond: (id < 10)
3570 (30 rows)
3571
3572 /*+NestLoop(p1 t1)*/
3573 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;
3574 LOG:  pg_hint_plan:
3575 used hint:
3576 NestLoop(p1 t1)
3577 not used hint:
3578 duplication hint:
3579 error hint:
3580
3581                                  QUERY PLAN                                  
3582 -----------------------------------------------------------------------------
3583  Nested Loop
3584    Join Filter: (public.p1.id = t1.id)
3585    ->  Append
3586          ->  Seq Scan on p1
3587                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3588          ->  Seq Scan on p1_c1 p1
3589                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3590          ->  Seq Scan on p1_c2 p1
3591                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3592          ->  Seq Scan on p1_c3 p1
3593                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3594          ->  Tid Scan on p1_c4 p1
3595                TID Cond: (ctid = '(1,1)'::tid)
3596                Filter: ((id >= 50) AND (id <= 51))
3597          ->  Tid Scan on p1_c1_c1 p1
3598                TID Cond: (ctid = '(1,1)'::tid)
3599                Filter: ((id >= 50) AND (id <= 51))
3600          ->  Tid Scan on p1_c1_c2 p1
3601                TID Cond: (ctid = '(1,1)'::tid)
3602                Filter: ((id >= 50) AND (id <= 51))
3603          ->  Tid Scan on p1_c3_c1 p1
3604                TID Cond: (ctid = '(1,1)'::tid)
3605                Filter: ((id >= 50) AND (id <= 51))
3606          ->  Tid Scan on p1_c3_c2 p1
3607                TID Cond: (ctid = '(1,1)'::tid)
3608                Filter: ((id >= 50) AND (id <= 51))
3609    ->  Materialize
3610          ->  Index Scan using t1_pkey on t1
3611                Index Cond: (id < 10)
3612 (29 rows)
3613
3614 /*+MergeJoin(p1 t1)*/
3615 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;
3616 LOG:  pg_hint_plan:
3617 used hint:
3618 MergeJoin(p1 t1)
3619 not used hint:
3620 duplication hint:
3621 error hint:
3622
3623                                     QUERY PLAN                                     
3624 -----------------------------------------------------------------------------------
3625  Merge Join
3626    Merge Cond: (public.p1.id = t1.id)
3627    ->  Sort
3628          Sort Key: public.p1.id
3629          ->  Append
3630                ->  Seq Scan on p1
3631                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3632                ->  Seq Scan on p1_c1 p1
3633                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3634                ->  Seq Scan on p1_c2 p1
3635                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3636                ->  Seq Scan on p1_c3 p1
3637                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3638                ->  Tid Scan on p1_c4 p1
3639                      TID Cond: (ctid = '(1,1)'::tid)
3640                      Filter: ((id >= 50) AND (id <= 51))
3641                ->  Tid Scan on p1_c1_c1 p1
3642                      TID Cond: (ctid = '(1,1)'::tid)
3643                      Filter: ((id >= 50) AND (id <= 51))
3644                ->  Tid Scan on p1_c1_c2 p1
3645                      TID Cond: (ctid = '(1,1)'::tid)
3646                      Filter: ((id >= 50) AND (id <= 51))
3647                ->  Tid Scan on p1_c3_c1 p1
3648                      TID Cond: (ctid = '(1,1)'::tid)
3649                      Filter: ((id >= 50) AND (id <= 51))
3650                ->  Tid Scan on p1_c3_c2 p1
3651                      TID Cond: (ctid = '(1,1)'::tid)
3652                      Filter: ((id >= 50) AND (id <= 51))
3653    ->  Index Scan using t1_pkey on t1
3654          Index Cond: (id < 10)
3655 (30 rows)
3656
3657 /*+HashJoin(p1 t1)*/
3658 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;
3659 LOG:  pg_hint_plan:
3660 used hint:
3661 HashJoin(p1 t1)
3662 not used hint:
3663 duplication hint:
3664 error hint:
3665
3666                                  QUERY PLAN                                  
3667 -----------------------------------------------------------------------------
3668  Hash Join
3669    Hash Cond: (public.p1.id = t1.id)
3670    ->  Append
3671          ->  Seq Scan on p1
3672                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3673          ->  Seq Scan on p1_c1 p1
3674                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3675          ->  Seq Scan on p1_c2 p1
3676                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3677          ->  Seq Scan on p1_c3 p1
3678                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3679          ->  Tid Scan on p1_c4 p1
3680                TID Cond: (ctid = '(1,1)'::tid)
3681                Filter: ((id >= 50) AND (id <= 51))
3682          ->  Tid Scan on p1_c1_c1 p1
3683                TID Cond: (ctid = '(1,1)'::tid)
3684                Filter: ((id >= 50) AND (id <= 51))
3685          ->  Tid Scan on p1_c1_c2 p1
3686                TID Cond: (ctid = '(1,1)'::tid)
3687                Filter: ((id >= 50) AND (id <= 51))
3688          ->  Tid Scan on p1_c3_c1 p1
3689                TID Cond: (ctid = '(1,1)'::tid)
3690                Filter: ((id >= 50) AND (id <= 51))
3691          ->  Tid Scan on p1_c3_c2 p1
3692                TID Cond: (ctid = '(1,1)'::tid)
3693                Filter: ((id >= 50) AND (id <= 51))
3694    ->  Hash
3695          ->  Index Scan using t1_pkey on t1
3696                Index Cond: (id < 10)
3697 (29 rows)
3698
3699 SET constraint_exclusion TO on;
3700 /*+SeqScan(p1)*/
3701 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;
3702 LOG:  pg_hint_plan:
3703 used hint:
3704 SeqScan(p1)
3705 not used hint:
3706 duplication hint:
3707 error hint:
3708
3709                                     QUERY PLAN                                     
3710 -----------------------------------------------------------------------------------
3711  Merge Join
3712    Merge Cond: (public.p1.id = t1.id)
3713    ->  Sort
3714          Sort Key: public.p1.id
3715          ->  Append
3716                ->  Seq Scan on p1
3717                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3718                ->  Seq Scan on p1_c1 p1
3719                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3720                ->  Tid Scan on p1_c1_c1 p1
3721                      TID Cond: (ctid = '(1,1)'::tid)
3722                      Filter: ((id >= 50) AND (id <= 51))
3723                ->  Tid Scan on p1_c1_c2 p1
3724                      TID Cond: (ctid = '(1,1)'::tid)
3725                      Filter: ((id >= 50) AND (id <= 51))
3726    ->  Index Scan using t1_pkey on t1
3727          Index Cond: (id < 10)
3728 (17 rows)
3729
3730 /*+IndexScan(p1)*/
3731 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;
3732 LOG:  pg_hint_plan:
3733 used hint:
3734 IndexScan(p1)
3735 not used hint:
3736 duplication hint:
3737 error hint:
3738
3739                                     QUERY PLAN                                     
3740 -----------------------------------------------------------------------------------
3741  Merge Join
3742    Merge Cond: (public.p1.id = t1.id)
3743    ->  Sort
3744          Sort Key: public.p1.id
3745          ->  Append
3746                ->  Seq Scan on p1
3747                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3748                ->  Seq Scan on p1_c1 p1
3749                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3750                ->  Tid Scan on p1_c1_c1 p1
3751                      TID Cond: (ctid = '(1,1)'::tid)
3752                      Filter: ((id >= 50) AND (id <= 51))
3753                ->  Tid Scan on p1_c1_c2 p1
3754                      TID Cond: (ctid = '(1,1)'::tid)
3755                      Filter: ((id >= 50) AND (id <= 51))
3756    ->  Index Scan using t1_pkey on t1
3757          Index Cond: (id < 10)
3758 (17 rows)
3759
3760 /*+BitmapScan(p1)*/
3761 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;
3762 LOG:  pg_hint_plan:
3763 used hint:
3764 BitmapScan(p1)
3765 not used hint:
3766 duplication hint:
3767 error hint:
3768
3769                                     QUERY PLAN                                     
3770 -----------------------------------------------------------------------------------
3771  Merge Join
3772    Merge Cond: (public.p1.id = t1.id)
3773    ->  Sort
3774          Sort Key: public.p1.id
3775          ->  Append
3776                ->  Seq Scan on p1
3777                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3778                ->  Seq Scan on p1_c1 p1
3779                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3780                ->  Tid Scan on p1_c1_c1 p1
3781                      TID Cond: (ctid = '(1,1)'::tid)
3782                      Filter: ((id >= 50) AND (id <= 51))
3783                ->  Tid Scan on p1_c1_c2 p1
3784                      TID Cond: (ctid = '(1,1)'::tid)
3785                      Filter: ((id >= 50) AND (id <= 51))
3786    ->  Index Scan using t1_pkey on t1
3787          Index Cond: (id < 10)
3788 (17 rows)
3789
3790 /*+TidScan(p1)*/
3791 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;
3792 LOG:  pg_hint_plan:
3793 used hint:
3794 TidScan(p1)
3795 not used hint:
3796 duplication hint:
3797 error hint:
3798
3799                                     QUERY PLAN                                     
3800 -----------------------------------------------------------------------------------
3801  Merge Join
3802    Merge Cond: (public.p1.id = t1.id)
3803    ->  Sort
3804          Sort Key: public.p1.id
3805          ->  Append
3806                ->  Seq Scan on p1
3807                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3808                ->  Seq Scan on p1_c1 p1
3809                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3810                ->  Tid Scan on p1_c1_c1 p1
3811                      TID Cond: (ctid = '(1,1)'::tid)
3812                      Filter: ((id >= 50) AND (id <= 51))
3813                ->  Tid Scan on p1_c1_c2 p1
3814                      TID Cond: (ctid = '(1,1)'::tid)
3815                      Filter: ((id >= 50) AND (id <= 51))
3816    ->  Index Scan using t1_pkey on t1
3817          Index Cond: (id < 10)
3818 (17 rows)
3819
3820 /*+NestLoop(p1 t1)*/
3821 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;
3822 LOG:  pg_hint_plan:
3823 used hint:
3824 NestLoop(p1 t1)
3825 not used hint:
3826 duplication hint:
3827 error hint:
3828
3829                                     QUERY PLAN                                     
3830 -----------------------------------------------------------------------------------
3831  Nested Loop
3832    Join Filter: (public.p1.id = t1.id)
3833    ->  Index Scan using t1_pkey on t1
3834          Index Cond: (id < 10)
3835    ->  Materialize
3836          ->  Append
3837                ->  Seq Scan on p1
3838                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3839                ->  Seq Scan on p1_c1 p1
3840                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3841                ->  Tid Scan on p1_c1_c1 p1
3842                      TID Cond: (ctid = '(1,1)'::tid)
3843                      Filter: ((id >= 50) AND (id <= 51))
3844                ->  Tid Scan on p1_c1_c2 p1
3845                      TID Cond: (ctid = '(1,1)'::tid)
3846                      Filter: ((id >= 50) AND (id <= 51))
3847 (16 rows)
3848
3849 /*+MergeJoin(p1 t1)*/
3850 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;
3851 LOG:  pg_hint_plan:
3852 used hint:
3853 MergeJoin(p1 t1)
3854 not used hint:
3855 duplication hint:
3856 error hint:
3857
3858                                     QUERY PLAN                                     
3859 -----------------------------------------------------------------------------------
3860  Merge Join
3861    Merge Cond: (public.p1.id = t1.id)
3862    ->  Sort
3863          Sort Key: public.p1.id
3864          ->  Append
3865                ->  Seq Scan on p1
3866                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3867                ->  Seq Scan on p1_c1 p1
3868                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3869                ->  Tid Scan on p1_c1_c1 p1
3870                      TID Cond: (ctid = '(1,1)'::tid)
3871                      Filter: ((id >= 50) AND (id <= 51))
3872                ->  Tid Scan on p1_c1_c2 p1
3873                      TID Cond: (ctid = '(1,1)'::tid)
3874                      Filter: ((id >= 50) AND (id <= 51))
3875    ->  Index Scan using t1_pkey on t1
3876          Index Cond: (id < 10)
3877 (17 rows)
3878
3879 /*+HashJoin(p1 t1)*/
3880 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;
3881 LOG:  pg_hint_plan:
3882 used hint:
3883 HashJoin(p1 t1)
3884 not used hint:
3885 duplication hint:
3886 error hint:
3887
3888                                     QUERY PLAN                                     
3889 -----------------------------------------------------------------------------------
3890  Hash Join
3891    Hash Cond: (t1.id = public.p1.id)
3892    ->  Index Scan using t1_pkey on t1
3893          Index Cond: (id < 10)
3894    ->  Hash
3895          ->  Append
3896                ->  Seq Scan on p1
3897                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3898                ->  Seq Scan on p1_c1 p1
3899                      Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3900                ->  Tid Scan on p1_c1_c1 p1
3901                      TID Cond: (ctid = '(1,1)'::tid)
3902                      Filter: ((id >= 50) AND (id <= 51))
3903                ->  Tid Scan on p1_c1_c2 p1
3904                      TID Cond: (ctid = '(1,1)'::tid)
3905                      Filter: ((id >= 50) AND (id <= 51))
3906 (16 rows)
3907
3908 SET constraint_exclusion TO off;
3909 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3910                            QUERY PLAN                            
3911 -----------------------------------------------------------------
3912  Seq Scan on p1
3913    Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3914 (2 rows)
3915
3916 SET constraint_exclusion TO on;
3917 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3918                            QUERY PLAN                            
3919 -----------------------------------------------------------------
3920  Seq Scan on p1
3921    Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3922 (2 rows)
3923
3924 SET constraint_exclusion TO off;
3925 /*+SeqScan(p1)*/
3926 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3927 LOG:  pg_hint_plan:
3928 used hint:
3929 SeqScan(p1)
3930 not used hint:
3931 duplication hint:
3932 error hint:
3933
3934                            QUERY PLAN                            
3935 -----------------------------------------------------------------
3936  Seq Scan on p1
3937    Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3938 (2 rows)
3939
3940 /*+IndexScan(p1)*/
3941 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3942 LOG:  pg_hint_plan:
3943 used hint:
3944 IndexScan(p1)
3945 not used hint:
3946 duplication hint:
3947 error hint:
3948
3949                 QUERY PLAN                 
3950 -------------------------------------------
3951  Index Scan using p1_pkey on p1
3952    Index Cond: ((id >= 50) AND (id <= 51))
3953    Filter: (ctid = '(1,1)'::tid)
3954 (3 rows)
3955
3956 /*+BitmapScan(p1)*/
3957 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3958 LOG:  pg_hint_plan:
3959 used hint:
3960 BitmapScan(p1)
3961 not used hint:
3962 duplication hint:
3963 error hint:
3964
3965                    QUERY PLAN                    
3966 -------------------------------------------------
3967  Bitmap Heap Scan on p1
3968    Recheck Cond: ((id >= 50) AND (id <= 51))
3969    Filter: (ctid = '(1,1)'::tid)
3970    ->  Bitmap Index Scan on p1_pkey
3971          Index Cond: ((id >= 50) AND (id <= 51))
3972 (5 rows)
3973
3974 /*+TidScan(p1)*/
3975 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3976 LOG:  pg_hint_plan:
3977 used hint:
3978 TidScan(p1)
3979 not used hint:
3980 duplication hint:
3981 error hint:
3982
3983               QUERY PLAN               
3984 ---------------------------------------
3985  Tid Scan on p1
3986    TID Cond: (ctid = '(1,1)'::tid)
3987    Filter: ((id >= 50) AND (id <= 51))
3988 (3 rows)
3989
3990 /*+NestLoop(p1 t1)*/
3991 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;
3992 LOG:  pg_hint_plan:
3993 used hint:
3994 NestLoop(p1 t1)
3995 not used hint:
3996 duplication hint:
3997 error hint:
3998
3999                               QUERY PLAN                               
4000 -----------------------------------------------------------------------
4001  Nested Loop
4002    ->  Seq Scan on p1
4003          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4004    ->  Index Scan using t1_pkey on t1
4005          Index Cond: ((id < 10) AND (id = p1.id))
4006 (5 rows)
4007
4008 /*+MergeJoin(p1 t1)*/
4009 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;
4010 LOG:  pg_hint_plan:
4011 used hint:
4012 MergeJoin(p1 t1)
4013 not used hint:
4014 duplication hint:
4015 error hint:
4016
4017                                  QUERY PLAN                                  
4018 -----------------------------------------------------------------------------
4019  Merge Join
4020    Merge Cond: (p1.id = t1.id)
4021    ->  Sort
4022          Sort Key: p1.id
4023          ->  Seq Scan on p1
4024                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4025    ->  Index Scan using t1_pkey on t1
4026          Index Cond: (id < 10)
4027 (8 rows)
4028
4029 /*+HashJoin(p1 t1)*/
4030 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;
4031 LOG:  pg_hint_plan:
4032 used hint:
4033 HashJoin(p1 t1)
4034 not used hint:
4035 duplication hint:
4036 error hint:
4037
4038                                  QUERY PLAN                                  
4039 -----------------------------------------------------------------------------
4040  Hash Join
4041    Hash Cond: (t1.id = p1.id)
4042    ->  Index Scan using t1_pkey on t1
4043          Index Cond: (id < 10)
4044    ->  Hash
4045          ->  Seq Scan on p1
4046                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4047 (7 rows)
4048
4049 SET constraint_exclusion TO on;
4050 /*+SeqScan(p1)*/
4051 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4052 LOG:  pg_hint_plan:
4053 used hint:
4054 SeqScan(p1)
4055 not used hint:
4056 duplication hint:
4057 error hint:
4058
4059                            QUERY PLAN                            
4060 -----------------------------------------------------------------
4061  Seq Scan on p1
4062    Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4063 (2 rows)
4064
4065 /*+IndexScan(p1)*/
4066 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4067 LOG:  pg_hint_plan:
4068 used hint:
4069 IndexScan(p1)
4070 not used hint:
4071 duplication hint:
4072 error hint:
4073
4074                 QUERY PLAN                 
4075 -------------------------------------------
4076  Index Scan using p1_pkey on p1
4077    Index Cond: ((id >= 50) AND (id <= 51))
4078    Filter: (ctid = '(1,1)'::tid)
4079 (3 rows)
4080
4081 /*+BitmapScan(p1)*/
4082 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4083 LOG:  pg_hint_plan:
4084 used hint:
4085 BitmapScan(p1)
4086 not used hint:
4087 duplication hint:
4088 error hint:
4089
4090                    QUERY PLAN                    
4091 -------------------------------------------------
4092  Bitmap Heap Scan on p1
4093    Recheck Cond: ((id >= 50) AND (id <= 51))
4094    Filter: (ctid = '(1,1)'::tid)
4095    ->  Bitmap Index Scan on p1_pkey
4096          Index Cond: ((id >= 50) AND (id <= 51))
4097 (5 rows)
4098
4099 /*+TidScan(p1)*/
4100 EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4101 LOG:  pg_hint_plan:
4102 used hint:
4103 TidScan(p1)
4104 not used hint:
4105 duplication hint:
4106 error hint:
4107
4108               QUERY PLAN               
4109 ---------------------------------------
4110  Tid Scan on p1
4111    TID Cond: (ctid = '(1,1)'::tid)
4112    Filter: ((id >= 50) AND (id <= 51))
4113 (3 rows)
4114
4115 /*+NestLoop(p1 t1)*/
4116 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;
4117 LOG:  pg_hint_plan:
4118 used hint:
4119 NestLoop(p1 t1)
4120 not used hint:
4121 duplication hint:
4122 error hint:
4123
4124                               QUERY PLAN                               
4125 -----------------------------------------------------------------------
4126  Nested Loop
4127    ->  Seq Scan on p1
4128          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4129    ->  Index Scan using t1_pkey on t1
4130          Index Cond: ((id < 10) AND (id = p1.id))
4131 (5 rows)
4132
4133 /*+MergeJoin(p1 t1)*/
4134 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;
4135 LOG:  pg_hint_plan:
4136 used hint:
4137 MergeJoin(p1 t1)
4138 not used hint:
4139 duplication hint:
4140 error hint:
4141
4142                                  QUERY PLAN                                  
4143 -----------------------------------------------------------------------------
4144  Merge Join
4145    Merge Cond: (p1.id = t1.id)
4146    ->  Sort
4147          Sort Key: p1.id
4148          ->  Seq Scan on p1
4149                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4150    ->  Index Scan using t1_pkey on t1
4151          Index Cond: (id < 10)
4152 (8 rows)
4153
4154 /*+HashJoin(p1 t1)*/
4155 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;
4156 LOG:  pg_hint_plan:
4157 used hint:
4158 HashJoin(p1 t1)
4159 not used hint:
4160 duplication hint:
4161 error hint:
4162
4163                                  QUERY PLAN                                  
4164 -----------------------------------------------------------------------------
4165  Hash Join
4166    Hash Cond: (t1.id = p1.id)
4167    ->  Index Scan using t1_pkey on t1
4168          Index Cond: (id < 10)
4169    ->  Hash
4170          ->  Seq Scan on p1
4171                Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4172 (7 rows)
4173
4174 SET constraint_exclusion TO off;
4175 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;
4176                               QUERY PLAN                               
4177 -----------------------------------------------------------------------
4178  Nested Loop
4179    ->  Seq Scan on p1
4180          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4181    ->  Index Scan using t1_pkey on t1
4182          Index Cond: ((id < 10) AND (id = p1.id))
4183 (5 rows)
4184
4185 SET constraint_exclusion TO on;
4186 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;
4187                               QUERY PLAN                               
4188 -----------------------------------------------------------------------
4189  Nested Loop
4190    ->  Seq Scan on p1
4191          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4192    ->  Index Scan using t1_pkey on t1
4193          Index Cond: ((id < 10) AND (id = p1.id))
4194 (5 rows)
4195
4196 SET constraint_exclusion TO off;
4197 /*+SeqScan(p1)*/
4198 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;
4199 LOG:  pg_hint_plan:
4200 used hint:
4201 SeqScan(p1)
4202 not used hint:
4203 duplication hint:
4204 error hint:
4205
4206                               QUERY PLAN                               
4207 -----------------------------------------------------------------------
4208  Nested Loop
4209    ->  Seq Scan on p1
4210          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4211    ->  Index Scan using t1_pkey on t1
4212          Index Cond: ((id < 10) AND (id = p1.id))
4213 (5 rows)
4214
4215 /*+IndexScan(p1)*/
4216 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;
4217 LOG:  pg_hint_plan:
4218 used hint:
4219 IndexScan(p1)
4220 not used hint:
4221 duplication hint:
4222 error hint:
4223
4224                     QUERY PLAN                    
4225 --------------------------------------------------
4226  Nested Loop
4227    ->  Index Scan using p1_pkey on p1
4228          Index Cond: ((id >= 50) AND (id <= 51))
4229          Filter: (ctid = '(1,1)'::tid)
4230    ->  Index Scan using t1_pkey on t1
4231          Index Cond: ((id < 10) AND (id = p1.id))
4232 (6 rows)
4233
4234 /*+BitmapScan(p1)*/
4235 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;
4236 LOG:  pg_hint_plan:
4237 used hint:
4238 BitmapScan(p1)
4239 not used hint:
4240 duplication hint:
4241 error hint:
4242
4243                       QUERY PLAN                       
4244 -------------------------------------------------------
4245  Nested Loop
4246    ->  Bitmap Heap Scan on p1
4247          Recheck Cond: ((id >= 50) AND (id <= 51))
4248          Filter: (ctid = '(1,1)'::tid)
4249          ->  Bitmap Index Scan on p1_pkey
4250                Index Cond: ((id >= 50) AND (id <= 51))
4251    ->  Index Scan using t1_pkey on t1
4252          Index Cond: ((id < 10) AND (id = p1.id))
4253 (8 rows)
4254
4255 /*+TidScan(p1)*/
4256 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;
4257 LOG:  pg_hint_plan:
4258 used hint:
4259 TidScan(p1)
4260 not used hint:
4261 duplication hint:
4262 error hint:
4263
4264                     QUERY PLAN                    
4265 --------------------------------------------------
4266  Nested Loop
4267    ->  Tid Scan on p1
4268          TID Cond: (ctid = '(1,1)'::tid)
4269          Filter: ((id >= 50) AND (id <= 51))
4270    ->  Index Scan using t1_pkey on t1
4271          Index Cond: ((id < 10) AND (id = p1.id))
4272 (6 rows)
4273
4274 SET constraint_exclusion TO on;
4275 /*+SeqScan(p1)*/
4276 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;
4277 LOG:  pg_hint_plan:
4278 used hint:
4279 SeqScan(p1)
4280 not used hint:
4281 duplication hint:
4282 error hint:
4283
4284                               QUERY PLAN                               
4285 -----------------------------------------------------------------------
4286  Nested Loop
4287    ->  Seq Scan on p1
4288          Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4289    ->  Index Scan using t1_pkey on t1
4290          Index Cond: ((id < 10) AND (id = p1.id))
4291 (5 rows)
4292
4293 /*+IndexScan(p1)*/
4294 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;
4295 LOG:  pg_hint_plan:
4296 used hint:
4297 IndexScan(p1)
4298 not used hint:
4299 duplication hint:
4300 error hint:
4301
4302                     QUERY PLAN                    
4303 --------------------------------------------------
4304  Nested Loop
4305    ->  Index Scan using p1_pkey on p1
4306          Index Cond: ((id >= 50) AND (id <= 51))
4307          Filter: (ctid = '(1,1)'::tid)
4308    ->  Index Scan using t1_pkey on t1
4309          Index Cond: ((id < 10) AND (id = p1.id))
4310 (6 rows)
4311
4312 /*+BitmapScan(p1)*/
4313 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;
4314 LOG:  pg_hint_plan:
4315 used hint:
4316 BitmapScan(p1)
4317 not used hint:
4318 duplication hint:
4319 error hint:
4320
4321                       QUERY PLAN                       
4322 -------------------------------------------------------
4323  Nested Loop
4324    ->  Bitmap Heap Scan on p1
4325          Recheck Cond: ((id >= 50) AND (id <= 51))
4326          Filter: (ctid = '(1,1)'::tid)
4327          ->  Bitmap Index Scan on p1_pkey
4328                Index Cond: ((id >= 50) AND (id <= 51))
4329    ->  Index Scan using t1_pkey on t1
4330          Index Cond: ((id < 10) AND (id = p1.id))
4331 (8 rows)
4332
4333 /*+TidScan(p1)*/
4334 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;
4335 LOG:  pg_hint_plan:
4336 used hint:
4337 TidScan(p1)
4338 not used hint:
4339 duplication hint:
4340 error hint:
4341
4342                     QUERY PLAN                    
4343 --------------------------------------------------
4344  Nested Loop
4345    ->  Tid Scan on p1
4346          TID Cond: (ctid = '(1,1)'::tid)
4347          Filter: ((id >= 50) AND (id <= 51))
4348    ->  Index Scan using t1_pkey on t1
4349          Index Cond: ((id < 10) AND (id = p1.id))
4350 (6 rows)
4351
4352 -- quote test
4353 /*+SeqScan("""t1 )      ")IndexScan("t  2 """)HashJoin("""t1 )  "T3"t   2 """)Leading("""t1 )   "T3"t   2 """)Set(application_name"a    a       a""     a       A")*/
4354 EXPLAIN (COSTS false) SELECT * FROM t1 """t1 )  ", t2 "t        2 """, t3 "T3" WHERE """t1 )    ".id = "t       2 """.id AND """t1 )    ".id = "T3".id;
4355 LOG:  pg_hint_plan:
4356 used hint:
4357 SeqScan("""t1 ) ")
4358 IndexScan("t    2 """)
4359 HashJoin("""t1 )        " T3 "t 2 """)
4360 Leading("""t1 ) " T3 "t 2 """)
4361 Set(application_name "a a       a""     a       A")
4362 not used hint:
4363 duplication hint:
4364 error hint:
4365
4366                        QUERY PLAN                        
4367 ---------------------------------------------------------
4368  Hash Join
4369    Hash Cond: ("t        2 """.id = """t1 )      ".id)
4370    ->  Index Scan using t2_pkey on t2 "t 2 """
4371    ->  Hash
4372          ->  Hash Join
4373                Hash Cond: ("""t1 )       ".id = "T3".id)
4374                ->  Seq Scan on t1 """t1 )        "
4375                ->  Hash
4376                      ->  Seq Scan on t3 "T3"
4377 (9 rows)
4378
4379 -- duplicate hint test
4380 /*+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)*/
4381 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
4382 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)"
4383 DETAIL:  Conflict scan method hint.
4384 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)"
4385 DETAIL:  Conflict scan method hint.
4386 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)"
4387 DETAIL:  Conflict scan method hint.
4388 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)"
4389 DETAIL:  Conflict scan method hint.
4390 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)"
4391 DETAIL:  Conflict scan method hint.
4392 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)"
4393 DETAIL:  Conflict scan method hint.
4394 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)"
4395 DETAIL:  Conflict join method hint.
4396 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)"
4397 DETAIL:  Conflict join method hint.
4398 INFO:  hint syntax error at or near "Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4399 DETAIL:  Conflict set hint.
4400 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)"
4401 DETAIL:  Conflict leading hint.
4402 LOG:  pg_hint_plan:
4403 used hint:
4404 TidScan(t1)
4405 TidScan(t2)
4406 MergeJoin(t1 t2)
4407 Leading(t2 t1)
4408 Set(enable_mergejoin on)
4409 Set(enable_seqscan on)
4410 not used hint:
4411 duplication hint:
4412 SeqScan(t1)
4413 IndexScan(t1)
4414 BitmapScan(t1)
4415 SeqScan(t2)
4416 IndexScan(t2)
4417 BitmapScan(t2)
4418 HashJoin(t1 t2)
4419 NestLoop(t1 t2)
4420 Leading(t1 t2)
4421 Set(enable_seqscan off)
4422 error hint:
4423
4424                   QUERY PLAN                   
4425 -----------------------------------------------
4426  Merge Join
4427    Merge Cond: (t1.id = t2.id)
4428    ->  Sort
4429          Sort Key: t1.id
4430          ->  Tid Scan on t1
4431                TID Cond: (ctid = '(1,1)'::tid)
4432    ->  Sort
4433          Sort Key: t2.id
4434          ->  Tid Scan on t2
4435                TID Cond: (ctid = '(1,1)'::tid)
4436 (10 rows)
4437
4438 -- sub query Leading hint test
4439 SET from_collapse_limit TO 100;
4440 SET geqo_threshold TO 100;
4441 EXPLAIN (COSTS false)
4442 WITH c1_1(id) AS (
4443 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
4444 )
4445 SELECT t1_1.id, (
4446 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
4447 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4448 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
4449 ) 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 = (
4450 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 
4451 );
4452                                QUERY PLAN                                
4453 -------------------------------------------------------------------------
4454  Nested Loop
4455    CTE c1_1
4456      ->  Aggregate
4457            ->  Merge Join
4458                  Merge Cond: (t1_5.id = t3_5.id)
4459                  ->  Merge Join
4460                        Merge Cond: (t1_5.id = t2_5.id)
4461                        ->  Index Scan using t1_pkey on t1 t1_5
4462                        ->  Index Scan using t2_pkey on t2 t2_5
4463                  ->  Sort
4464                        Sort Key: t3_5.id
4465                        ->  Seq Scan on t3 t3_5
4466    InitPlan 2 (returns $1)
4467      ->  Aggregate
4468            ->  Merge Join
4469                  Merge Cond: (t1_2.id = t3_2.id)
4470                  ->  Merge Join
4471                        Merge Cond: (t1_2.id = t2_2.id)
4472                        ->  Index Scan using t1_pkey on t1 t1_2
4473                        ->  Index Scan using t2_pkey on t2 t2_2
4474                  ->  Sort
4475                        Sort Key: t3_2.id
4476                        ->  Seq Scan on t3 t3_2
4477    InitPlan 3 (returns $2)
4478      ->  Aggregate
4479            ->  Merge Join
4480                  Merge Cond: (t1_4.id = t3_4.id)
4481                  ->  Merge Join
4482                        Merge Cond: (t1_4.id = t2_4.id)
4483                        ->  Index Scan using t1_pkey on t1 t1_4
4484                        ->  Index Scan using t2_pkey on t2 t2_4
4485                  ->  Sort
4486                        Sort Key: t3_4.id
4487                        ->  Seq Scan on t3 t3_4
4488    ->  Nested Loop
4489          ->  Nested Loop
4490                ->  Nested Loop
4491                      ->  Nested Loop
4492                            ->  Nested Loop
4493                                  ->  Index Scan using t1_pkey on t1 t1_1
4494                                        Index Cond: (id = $2)
4495                                  ->  Seq Scan on t3 t3_1
4496                                        Filter: (id = $2)
4497                            ->  Index Scan using t2_pkey on t2 t2_1
4498                                  Index Cond: (id = $2)
4499                      ->  Index Scan using t1_pkey on t1 t1_3
4500                            Index Cond: (id = $2)
4501                ->  Index Scan using t2_pkey on t2 t2_3
4502                      Index Cond: (id = $2)
4503          ->  Seq Scan on t3 t3_3
4504                Filter: (id = $2)
4505    ->  CTE Scan on c1_1
4506          Filter: (id = $2)
4507 (53 rows)
4508
4509 /*+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)*/
4510 EXPLAIN (COSTS false)
4511 WITH c1_1(id) AS (
4512 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
4513 )
4514 SELECT t1_1.id, (
4515 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
4516 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4517 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
4518 ) 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 = (
4519 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 
4520 );
4521 LOG:  pg_hint_plan:
4522 used hint:
4523 HashJoin(t1_1 t3_1)
4524 NestLoop(t1_2 t2_2)
4525 MergeJoin(t1_3 t3_3)
4526 NestLoop(t1_4 t2_4)
4527 NestLoop(t1_5 t2_5)
4528 not used hint:
4529 duplication hint:
4530 error hint:
4531
4532                                QUERY PLAN                                
4533 -------------------------------------------------------------------------
4534  Nested Loop
4535    CTE c1_1
4536      ->  Aggregate
4537            ->  Merge Join
4538                  Merge Cond: (t1_5.id = t3_5.id)
4539                  ->  Nested Loop
4540                        ->  Index Scan using t2_pkey on t2 t2_5
4541                        ->  Index Scan using t1_pkey on t1 t1_5
4542                              Index Cond: (id = t2_5.id)
4543                  ->  Sort
4544                        Sort Key: t3_5.id
4545                        ->  Seq Scan on t3 t3_5
4546    InitPlan 2 (returns $2)
4547      ->  Aggregate
4548            ->  Merge Join
4549                  Merge Cond: (t1_2.id = t3_2.id)
4550                  ->  Nested Loop
4551                        ->  Index Scan using t2_pkey on t2 t2_2
4552                        ->  Index Scan using t1_pkey on t1 t1_2
4553                              Index Cond: (id = t2_2.id)
4554                  ->  Sort
4555                        Sort Key: t3_2.id
4556                        ->  Seq Scan on t3 t3_2
4557    InitPlan 3 (returns $3)
4558      ->  Aggregate
4559            ->  Merge Join
4560                  Merge Cond: (t1_4.id = t3_4.id)
4561                  ->  Nested Loop
4562                        ->  Index Scan using t2_pkey on t2 t2_4
4563                        ->  Index Scan using t1_pkey on t1 t1_4
4564                              Index Cond: (id = t2_4.id)
4565                  ->  Sort
4566                        Sort Key: t3_4.id
4567                        ->  Seq Scan on t3 t3_4
4568    ->  Nested Loop
4569          ->  Nested Loop
4570                ->  Nested Loop
4571                      ->  Nested Loop
4572                            ->  Nested Loop
4573                                  ->  Index Scan using t2_pkey on t2 t2_1
4574                                        Index Cond: (id = $3)
4575                                  ->  Seq Scan on t3 t3_1
4576                                        Filter: (id = $3)
4577                            ->  Index Scan using t1_pkey on t1 t1_1
4578                                  Index Cond: (id = $3)
4579                      ->  Index Scan using t1_pkey on t1 t1_3
4580                            Index Cond: (id = $3)
4581                ->  Index Scan using t2_pkey on t2 t2_3
4582                      Index Cond: (id = $3)
4583          ->  Seq Scan on t3 t3_3
4584                Filter: (id = $3)
4585    ->  CTE Scan on c1_1
4586          Filter: (id = $3)
4587 (53 rows)
4588
4589 /*+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)*/
4590 EXPLAIN (COSTS false)
4591 WITH c1_1(id) AS (
4592 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
4593 )
4594 SELECT t1_1.id, (
4595 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
4596 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4597 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
4598 ) 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 = (
4599 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 
4600 );
4601 LOG:  pg_hint_plan:
4602 used hint:
4603 HashJoin(t1_1 t3_1)
4604 NestLoop(t1_2 t2_2)
4605 MergeJoin(t1_3 t3_3)
4606 NestLoop(t1_4 t2_4)
4607 NestLoop(t1_5 t2_5)
4608 not used hint:
4609 Leading(a t1_1 t1_2 t1_4 t1_5)
4610 duplication hint:
4611 error hint:
4612
4613                                QUERY PLAN                                
4614 -------------------------------------------------------------------------
4615  Nested Loop
4616    CTE c1_1
4617      ->  Aggregate
4618            ->  Merge Join
4619                  Merge Cond: (t1_5.id = t3_5.id)
4620                  ->  Nested Loop
4621                        ->  Index Scan using t2_pkey on t2 t2_5
4622                        ->  Index Scan using t1_pkey on t1 t1_5
4623                              Index Cond: (id = t2_5.id)
4624                  ->  Sort
4625                        Sort Key: t3_5.id
4626                        ->  Seq Scan on t3 t3_5
4627    InitPlan 2 (returns $2)
4628      ->  Aggregate
4629            ->  Merge Join
4630                  Merge Cond: (t1_2.id = t3_2.id)
4631                  ->  Nested Loop
4632                        ->  Index Scan using t2_pkey on t2 t2_2
4633                        ->  Index Scan using t1_pkey on t1 t1_2
4634                              Index Cond: (id = t2_2.id)
4635                  ->  Sort
4636                        Sort Key: t3_2.id
4637                        ->  Seq Scan on t3 t3_2
4638    InitPlan 3 (returns $3)
4639      ->  Aggregate
4640            ->  Merge Join
4641                  Merge Cond: (t1_4.id = t3_4.id)
4642                  ->  Nested Loop
4643                        ->  Index Scan using t2_pkey on t2 t2_4
4644                        ->  Index Scan using t1_pkey on t1 t1_4
4645                              Index Cond: (id = t2_4.id)
4646                  ->  Sort
4647                        Sort Key: t3_4.id
4648                        ->  Seq Scan on t3 t3_4
4649    ->  Nested Loop
4650          ->  Nested Loop
4651                ->  Nested Loop
4652                      ->  Nested Loop
4653                            ->  Nested Loop
4654                                  ->  Index Scan using t2_pkey on t2 t2_1
4655                                        Index Cond: (id = $3)
4656                                  ->  Seq Scan on t3 t3_1
4657                                        Filter: (id = $3)
4658                            ->  Index Scan using t1_pkey on t1 t1_1
4659                                  Index Cond: (id = $3)
4660                      ->  Index Scan using t1_pkey on t1 t1_3
4661                            Index Cond: (id = $3)
4662                ->  Index Scan using t2_pkey on t2 t2_3
4663                      Index Cond: (id = $3)
4664          ->  Seq Scan on t3 t3_3
4665                Filter: (id = $3)
4666    ->  CTE Scan on c1_1
4667          Filter: (id = $3)
4668 (53 rows)
4669
4670 /*+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)*/
4671 EXPLAIN (COSTS false)
4672 WITH c1_1(id) AS (
4673 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
4674 )
4675 SELECT t1_1.id, (
4676 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
4677 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4678 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
4679 ) 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 = (
4680 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 
4681 );
4682 LOG:  pg_hint_plan:
4683 used hint:
4684 HashJoin(t1_1 t3_1)
4685 NestLoop(t1_2 t2_2)
4686 MergeJoin(t1_3 t3_3)
4687 NestLoop(t1_4 t2_4)
4688 NestLoop(t1_5 t2_5)
4689 not used hint:
4690 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)
4691 duplication hint:
4692 error hint:
4693
4694                                QUERY PLAN                                
4695 -------------------------------------------------------------------------
4696  Nested Loop
4697    CTE c1_1
4698      ->  Aggregate
4699            ->  Merge Join
4700                  Merge Cond: (t1_5.id = t3_5.id)
4701                  ->  Nested Loop
4702                        ->  Index Scan using t2_pkey on t2 t2_5
4703                        ->  Index Scan using t1_pkey on t1 t1_5
4704                              Index Cond: (id = t2_5.id)
4705                  ->  Sort
4706                        Sort Key: t3_5.id
4707                        ->  Seq Scan on t3 t3_5
4708    InitPlan 2 (returns $2)
4709      ->  Aggregate
4710            ->  Merge Join
4711                  Merge Cond: (t1_2.id = t3_2.id)
4712                  ->  Nested Loop
4713                        ->  Index Scan using t2_pkey on t2 t2_2
4714                        ->  Index Scan using t1_pkey on t1 t1_2
4715                              Index Cond: (id = t2_2.id)
4716                  ->  Sort
4717                        Sort Key: t3_2.id
4718                        ->  Seq Scan on t3 t3_2
4719    InitPlan 3 (returns $3)
4720      ->  Aggregate
4721            ->  Merge Join
4722                  Merge Cond: (t1_4.id = t3_4.id)
4723                  ->  Nested Loop
4724                        ->  Index Scan using t2_pkey on t2 t2_4
4725                        ->  Index Scan using t1_pkey on t1 t1_4
4726                              Index Cond: (id = t2_4.id)
4727                  ->  Sort
4728                        Sort Key: t3_4.id
4729                        ->  Seq Scan on t3 t3_4
4730    ->  Nested Loop
4731          ->  Nested Loop
4732                ->  Nested Loop
4733                      ->  Nested Loop
4734                            ->  Nested Loop
4735                                  ->  Index Scan using t2_pkey on t2 t2_1
4736                                        Index Cond: (id = $3)
4737                                  ->  Seq Scan on t3 t3_1
4738                                        Filter: (id = $3)
4739                            ->  Index Scan using t1_pkey on t1 t1_1
4740                                  Index Cond: (id = $3)
4741                      ->  Index Scan using t1_pkey on t1 t1_3
4742                            Index Cond: (id = $3)
4743                ->  Index Scan using t2_pkey on t2 t2_3
4744                      Index Cond: (id = $3)
4745          ->  Seq Scan on t3 t3_3
4746                Filter: (id = $3)
4747    ->  CTE Scan on c1_1
4748          Filter: (id = $3)
4749 (53 rows)
4750
4751 /*+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(t3_5 t2_5 t1_5)Leading(t3_2 t2_2 t1_2)Leading(t3_4 t2_4 t1_4)Leading(c1_1 t3_3 t2_3 t1_3 t3_1 t2_1 t1_1)*/
4752 EXPLAIN (COSTS false)
4753 WITH c1_1(id) AS (
4754 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
4755 )
4756 SELECT t1_1.id, (
4757 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
4758 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4759 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
4760 ) 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 = (
4761 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 
4762 );
4763 LOG:  pg_hint_plan:
4764 used hint:
4765 Leading(t3_5 t2_5 t1_5)
4766 Leading(t3_2 t2_2 t1_2)
4767 Leading(t3_4 t2_4 t1_4)
4768 Leading(c1_1 t3_3 t2_3 t1_3 t3_1 t2_1 t1_1)
4769 not used hint:
4770 HashJoin(t1_1 t3_1)
4771 NestLoop(t1_2 t2_2)
4772 MergeJoin(t1_3 t3_3)
4773 NestLoop(t1_4 t2_4)
4774 NestLoop(t1_5 t2_5)
4775 duplication hint:
4776 error hint:
4777
4778                             QUERY PLAN                             
4779 -------------------------------------------------------------------
4780  Nested Loop
4781    CTE c1_1
4782      ->  Aggregate
4783            ->  Merge Join
4784                  Merge Cond: (t2_5.id = t1_5.id)
4785                  ->  Merge Join
4786                        Merge Cond: (t2_5.id = t3_5.id)
4787                        ->  Index Scan using t2_pkey on t2 t2_5
4788                        ->  Sort
4789                              Sort Key: t3_5.id
4790                              ->  Seq Scan on t3 t3_5
4791                  ->  Index Scan using t1_pkey on t1 t1_5
4792    InitPlan 2 (returns $1)
4793      ->  Aggregate
4794            ->  Merge Join
4795                  Merge Cond: (t2_2.id = t1_2.id)
4796                  ->  Merge Join
4797                        Merge Cond: (t2_2.id = t3_2.id)
4798                        ->  Index Scan using t2_pkey on t2 t2_2
4799                        ->  Sort
4800                              Sort Key: t3_2.id
4801                              ->  Seq Scan on t3 t3_2
4802                  ->  Index Scan using t1_pkey on t1 t1_2
4803    InitPlan 3 (returns $2)
4804      ->  Aggregate
4805            ->  Merge Join
4806                  Merge Cond: (t2_4.id = t1_4.id)
4807                  ->  Merge Join
4808                        Merge Cond: (t2_4.id = t3_4.id)
4809                        ->  Index Scan using t2_pkey on t2 t2_4
4810                        ->  Sort
4811                              Sort Key: t3_4.id
4812                              ->  Seq Scan on t3 t3_4
4813                  ->  Index Scan using t1_pkey on t1 t1_4
4814    ->  Nested Loop
4815          ->  Nested Loop
4816                ->  Nested Loop
4817                      ->  Nested Loop
4818                            ->  Nested Loop
4819                                  ->  Seq Scan on t3 t3_3
4820                                        Filter: (id = $2)
4821                                  ->  CTE Scan on c1_1
4822                                        Filter: (id = $2)
4823                            ->  Index Scan using t2_pkey on t2 t2_3
4824                                  Index Cond: (id = $2)
4825                      ->  Index Scan using t1_pkey on t1 t1_3
4826                            Index Cond: (id = $2)
4827                ->  Seq Scan on t3 t3_1
4828                      Filter: (id = $2)
4829          ->  Index Scan using t2_pkey on t2 t2_1
4830                Index Cond: (id = $2)
4831    ->  Index Scan using t1_pkey on t1 t1_1
4832          Index Cond: (id = $2)
4833 (53 rows)
4834
4835 SET from_collapse_limit TO 1;
4836 EXPLAIN (COSTS false)
4837 WITH c1_1(id) AS (
4838 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
4839 )
4840 SELECT t1_1.id, (
4841 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
4842 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4843 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
4844 ) 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 = (
4845 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 
4846 );
4847                           QUERY PLAN                           
4848 ---------------------------------------------------------------
4849  Nested Loop
4850    CTE c1_1
4851      ->  Aggregate
4852            ->  Merge Join
4853                  Merge Cond: (t1_5.id = t3_5.id)
4854                  ->  Merge Join
4855                        Merge Cond: (t1_5.id = t2_5.id)
4856                        ->  Index Scan using t1_pkey on t1 t1_5
4857                        ->  Index Scan using t2_pkey on t2 t2_5
4858                  ->  Sort
4859                        Sort Key: t3_5.id
4860                        ->  Seq Scan on t3 t3_5
4861    InitPlan 2 (returns $1)
4862      ->  Aggregate
4863            ->  Merge Join
4864                  Merge Cond: (t1_2.id = t3_2.id)
4865                  ->  Merge Join
4866                        Merge Cond: (t1_2.id = t2_2.id)
4867                        ->  Index Scan using t1_pkey on t1 t1_2
4868                        ->  Index Scan using t2_pkey on t2 t2_2
4869                  ->  Sort
4870                        Sort Key: t3_2.id
4871                        ->  Seq Scan on t3 t3_2
4872    InitPlan 3 (returns $2)
4873      ->  Aggregate
4874            ->  Merge Join
4875                  Merge Cond: (t1_4.id = t3_4.id)
4876                  ->  Merge Join
4877                        Merge Cond: (t1_4.id = t2_4.id)
4878                        ->  Index Scan using t1_pkey on t1 t1_4
4879                        ->  Index Scan using t2_pkey on t2 t2_4
4880                  ->  Sort
4881                        Sort Key: t3_4.id
4882                        ->  Seq Scan on t3 t3_4
4883    ->  Nested Loop
4884          ->  Nested Loop
4885                ->  Nested Loop
4886                      ->  Index Scan using t1_pkey on t1 t1_1
4887                            Index Cond: (id = $2)
4888                      ->  Seq Scan on t3 t3_1
4889                            Filter: (id = $2)
4890                ->  Index Scan using t2_pkey on t2 t2_1
4891                      Index Cond: (id = $2)
4892          ->  Nested Loop
4893                ->  Nested Loop
4894                      ->  Index Scan using t1_pkey on t1 t1_3
4895                            Index Cond: (id = $2)
4896                      ->  Seq Scan on t3 t3_3
4897                            Filter: (id = $2)
4898                ->  Index Scan using t2_pkey on t2 t2_3
4899                      Index Cond: (id = $2)
4900    ->  CTE Scan on c1_1
4901          Filter: (id = $2)
4902 (53 rows)
4903
4904 /*+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)*/
4905 EXPLAIN (COSTS false)
4906 WITH c1_1(id) AS (
4907 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
4908 )
4909 SELECT t1_1.id, (
4910 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
4911 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4912 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
4913 ) 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 = (
4914 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 
4915 );
4916 LOG:  pg_hint_plan:
4917 used hint:
4918 HashJoin(t1_1 t3_1)
4919 NestLoop(t1_2 t2_2)
4920 MergeJoin(t1_3 t3_3)
4921 NestLoop(t1_4 t2_4)
4922 NestLoop(t1_5 t2_5)
4923 not used hint:
4924 duplication hint:
4925 error hint:
4926
4927                           QUERY PLAN                           
4928 ---------------------------------------------------------------
4929  Nested Loop
4930    CTE c1_1
4931      ->  Aggregate
4932            ->  Merge Join
4933                  Merge Cond: (t1_5.id = t3_5.id)
4934                  ->  Nested Loop
4935                        ->  Index Scan using t2_pkey on t2 t2_5
4936                        ->  Index Scan using t1_pkey on t1 t1_5
4937                              Index Cond: (id = t2_5.id)
4938                  ->  Sort
4939                        Sort Key: t3_5.id
4940                        ->  Seq Scan on t3 t3_5
4941    InitPlan 2 (returns $2)
4942      ->  Aggregate
4943            ->  Merge Join
4944                  Merge Cond: (t1_2.id = t3_2.id)
4945                  ->  Nested Loop
4946                        ->  Index Scan using t2_pkey on t2 t2_2
4947                        ->  Index Scan using t1_pkey on t1 t1_2
4948                              Index Cond: (id = t2_2.id)
4949                  ->  Sort
4950                        Sort Key: t3_2.id
4951                        ->  Seq Scan on t3 t3_2
4952    InitPlan 3 (returns $3)
4953      ->  Aggregate
4954            ->  Merge Join
4955                  Merge Cond: (t1_4.id = t3_4.id)
4956                  ->  Nested Loop
4957                        ->  Index Scan using t2_pkey on t2 t2_4
4958                        ->  Index Scan using t1_pkey on t1 t1_4
4959                              Index Cond: (id = t2_4.id)
4960                  ->  Sort
4961                        Sort Key: t3_4.id
4962                        ->  Seq Scan on t3 t3_4
4963    ->  Nested Loop
4964          ->  Nested Loop
4965                ->  Nested Loop
4966                      ->  Index Scan using t2_pkey on t2 t2_1
4967                            Index Cond: (id = $3)
4968                      ->  Seq Scan on t3 t3_1
4969                            Filter: (id = $3)
4970                ->  Index Scan using t1_pkey on t1 t1_1
4971                      Index Cond: (id = $3)
4972          ->  Nested Loop
4973                ->  Nested Loop
4974                      ->  Index Scan using t2_pkey on t2 t2_3
4975                            Index Cond: (id = $3)
4976                      ->  Seq Scan on t3 t3_3
4977                            Filter: (id = $3)
4978                ->  Index Scan using t1_pkey on t1 t1_3
4979                      Index Cond: (id = $3)
4980    ->  CTE Scan on c1_1
4981          Filter: (id = $3)
4982 (53 rows)
4983
4984 /*+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)*/
4985 EXPLAIN (COSTS false)
4986 WITH c1_1(id) AS (
4987 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
4988 )
4989 SELECT t1_1.id, (
4990 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
4991 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4992 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
4993 ) 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 = (
4994 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 
4995 );
4996 LOG:  pg_hint_plan:
4997 used hint:
4998 HashJoin(t1_1 t3_1)
4999 NestLoop(t1_2 t2_2)
5000 MergeJoin(t1_3 t3_3)
5001 NestLoop(t1_4 t2_4)
5002 NestLoop(t1_5 t2_5)
5003 not used hint:
5004 Leading(a t1_1 t1_2 t1_4 t1_5)
5005 duplication hint:
5006 error hint:
5007
5008                           QUERY PLAN                           
5009 ---------------------------------------------------------------
5010  Nested Loop
5011    CTE c1_1
5012      ->  Aggregate
5013            ->  Merge Join
5014                  Merge Cond: (t1_5.id = t3_5.id)
5015                  ->  Nested Loop
5016                        ->  Index Scan using t2_pkey on t2 t2_5
5017                        ->  Index Scan using t1_pkey on t1 t1_5
5018                              Index Cond: (id = t2_5.id)
5019                  ->  Sort
5020                        Sort Key: t3_5.id
5021                        ->  Seq Scan on t3 t3_5
5022    InitPlan 2 (returns $2)
5023      ->  Aggregate
5024            ->  Merge Join
5025                  Merge Cond: (t1_2.id = t3_2.id)
5026                  ->  Nested Loop
5027                        ->  Index Scan using t2_pkey on t2 t2_2
5028                        ->  Index Scan using t1_pkey on t1 t1_2
5029                              Index Cond: (id = t2_2.id)
5030                  ->  Sort
5031                        Sort Key: t3_2.id
5032                        ->  Seq Scan on t3 t3_2
5033    InitPlan 3 (returns $3)
5034      ->  Aggregate
5035            ->  Merge Join
5036                  Merge Cond: (t1_4.id = t3_4.id)
5037                  ->  Nested Loop
5038                        ->  Index Scan using t2_pkey on t2 t2_4
5039                        ->  Index Scan using t1_pkey on t1 t1_4
5040                              Index Cond: (id = t2_4.id)
5041                  ->  Sort
5042                        Sort Key: t3_4.id
5043                        ->  Seq Scan on t3 t3_4
5044    ->  Nested Loop
5045          ->  Nested Loop
5046                ->  Nested Loop
5047                      ->  Index Scan using t2_pkey on t2 t2_1
5048                            Index Cond: (id = $3)
5049                      ->  Seq Scan on t3 t3_1
5050                            Filter: (id = $3)
5051                ->  Index Scan using t1_pkey on t1 t1_1
5052                      Index Cond: (id = $3)
5053          ->  Nested Loop
5054                ->  Nested Loop
5055                      ->  Index Scan using t2_pkey on t2 t2_3
5056                            Index Cond: (id = $3)
5057                      ->  Seq Scan on t3 t3_3
5058                            Filter: (id = $3)
5059                ->  Index Scan using t1_pkey on t1 t1_3
5060                      Index Cond: (id = $3)
5061    ->  CTE Scan on c1_1
5062          Filter: (id = $3)
5063 (53 rows)
5064
5065 /*+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)*/
5066 EXPLAIN (COSTS false)
5067 WITH c1_1(id) AS (
5068 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
5069 )
5070 SELECT t1_1.id, (
5071 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
5072 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
5073 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
5074 ) 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 = (
5075 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 
5076 );
5077 LOG:  pg_hint_plan:
5078 used hint:
5079 HashJoin(t1_1 t3_1)
5080 NestLoop(t1_2 t2_2)
5081 MergeJoin(t1_3 t3_3)
5082 NestLoop(t1_4 t2_4)
5083 NestLoop(t1_5 t2_5)
5084 not used hint:
5085 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)
5086 duplication hint:
5087 error hint:
5088
5089                           QUERY PLAN                           
5090 ---------------------------------------------------------------
5091  Nested Loop
5092    CTE c1_1
5093      ->  Aggregate
5094            ->  Merge Join
5095                  Merge Cond: (t1_5.id = t3_5.id)
5096                  ->  Nested Loop
5097                        ->  Index Scan using t2_pkey on t2 t2_5
5098                        ->  Index Scan using t1_pkey on t1 t1_5
5099                              Index Cond: (id = t2_5.id)
5100                  ->  Sort
5101                        Sort Key: t3_5.id
5102                        ->  Seq Scan on t3 t3_5
5103    InitPlan 2 (returns $2)
5104      ->  Aggregate
5105            ->  Merge Join
5106                  Merge Cond: (t1_2.id = t3_2.id)
5107                  ->  Nested Loop
5108                        ->  Index Scan using t2_pkey on t2 t2_2
5109                        ->  Index Scan using t1_pkey on t1 t1_2
5110                              Index Cond: (id = t2_2.id)
5111                  ->  Sort
5112                        Sort Key: t3_2.id
5113                        ->  Seq Scan on t3 t3_2
5114    InitPlan 3 (returns $3)
5115      ->  Aggregate
5116            ->  Merge Join
5117                  Merge Cond: (t1_4.id = t3_4.id)
5118                  ->  Nested Loop
5119                        ->  Index Scan using t2_pkey on t2 t2_4
5120                        ->  Index Scan using t1_pkey on t1 t1_4
5121                              Index Cond: (id = t2_4.id)
5122                  ->  Sort
5123                        Sort Key: t3_4.id
5124                        ->  Seq Scan on t3 t3_4
5125    ->  Nested Loop
5126          ->  Nested Loop
5127                ->  Nested Loop
5128                      ->  Index Scan using t2_pkey on t2 t2_1
5129                            Index Cond: (id = $3)
5130                      ->  Seq Scan on t3 t3_1
5131                            Filter: (id = $3)
5132                ->  Index Scan using t1_pkey on t1 t1_1
5133                      Index Cond: (id = $3)
5134          ->  Nested Loop
5135                ->  Nested Loop
5136                      ->  Index Scan using t2_pkey on t2 t2_3
5137                            Index Cond: (id = $3)
5138                      ->  Seq Scan on t3 t3_3
5139                            Filter: (id = $3)
5140                ->  Index Scan using t1_pkey on t1 t1_3
5141                      Index Cond: (id = $3)
5142    ->  CTE Scan on c1_1
5143          Filter: (id = $3)
5144 (53 rows)
5145
5146 /*+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(t3_5 t2_5 t1_5)Leading(t3_2 t2_2 t1_2)Leading(t3_4 t2_4 t1_4)Leading(c1_1 t3_3 t2_3 t1_3 t3_1 t2_1 t1_1)*/
5147 EXPLAIN (COSTS false)
5148 WITH c1_1(id) AS (
5149 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
5150 )
5151 SELECT t1_1.id, (
5152 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
5153 ) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
5154 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
5155 ) 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 = (
5156 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 
5157 );
5158 LOG:  pg_hint_plan:
5159 used hint:
5160 MergeJoin(t1_3 t3_3)
5161 Leading(t3_5 t2_5 t1_5)
5162 Leading(t3_2 t2_2 t1_2)
5163 Leading(t3_4 t2_4 t1_4)
5164 Leading(c1_1 t3_3 t2_3 t1_3 t3_1 t2_1 t1_1)
5165 not used hint:
5166 HashJoin(t1_1 t3_1)
5167 NestLoop(t1_2 t2_2)
5168 NestLoop(t1_4 t2_4)
5169 NestLoop(t1_5 t2_5)
5170 duplication hint:
5171 error hint:
5172
5173                                QUERY PLAN                                
5174 -------------------------------------------------------------------------
5175  Nested Loop
5176    CTE c1_1
5177      ->  Aggregate
5178            ->  Merge Join
5179                  Merge Cond: (t2_5.id = t1_5.id)
5180                  ->  Merge Join
5181                        Merge Cond: (t2_5.id = t3_5.id)
5182                        ->  Index Scan using t2_pkey on t2 t2_5
5183                        ->  Sort
5184                              Sort Key: t3_5.id
5185                              ->  Seq Scan on t3 t3_5
5186                  ->  Index Scan using t1_pkey on t1 t1_5
5187    InitPlan 2 (returns $1)
5188      ->  Aggregate
5189            ->  Merge Join
5190                  Merge Cond: (t2_2.id = t1_2.id)
5191                  ->  Merge Join
5192                        Merge Cond: (t2_2.id = t3_2.id)
5193                        ->  Index Scan using t2_pkey on t2 t2_2
5194                        ->  Sort
5195                              Sort Key: t3_2.id
5196                              ->  Seq Scan on t3 t3_2
5197                  ->  Index Scan using t1_pkey on t1 t1_2
5198    InitPlan 3 (returns $2)
5199      ->  Aggregate
5200            ->  Merge Join
5201                  Merge Cond: (t2_4.id = t1_4.id)
5202                  ->  Merge Join
5203                        Merge Cond: (t2_4.id = t3_4.id)
5204                        ->  Index Scan using t2_pkey on t2 t2_4
5205                        ->  Sort
5206                              Sort Key: t3_4.id
5207                              ->  Seq Scan on t3 t3_4
5208                  ->  Index Scan using t1_pkey on t1 t1_4
5209    ->  Nested Loop
5210          ->  Nested Loop
5211                ->  Nested Loop
5212                      ->  Nested Loop
5213                            ->  Nested Loop
5214                                  ->  Index Scan using t1_pkey on t1 t1_3
5215                                        Index Cond: (id = $2)
5216                                  ->  Index Scan using t2_pkey on t2 t2_3
5217                                        Index Cond: (id = $2)
5218                            ->  Seq Scan on t3 t3_3
5219                                  Filter: (id = $2)
5220                      ->  CTE Scan on c1_1
5221                            Filter: (id = $2)
5222                ->  Seq Scan on t3 t3_1
5223                      Filter: (id = $2)
5224          ->  Index Scan using t2_pkey on t2 t2_1
5225                Index Cond: (id = $2)
5226    ->  Index Scan using t1_pkey on t1 t1_1
5227          Index Cond: (id = $2)
5228 (53 rows)
5229
5230 -- ambigous error
5231 EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id AND public.t1.id = t2.id;
5232                   QUERY PLAN                   
5233 -----------------------------------------------
5234  Merge Join
5235    Merge Cond: (public.t1.id = t2.id)
5236    ->  Merge Join
5237          Merge Cond: (public.t1.id = s0.t1.id)
5238          ->  Index Scan using t1_pkey on t1
5239          ->  Index Scan using t1_pkey on t1
5240    ->  Index Scan using t2_pkey on t2
5241 (7 rows)
5242
5243 /*+NestLoop(t1 t2)*/
5244 EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id AND public.t1.id = t2.id;
5245 INFO:  hint syntax error at or near "NestLoop(t1 t2)"
5246 DETAIL:  Relation name "t1" is ambiguous.
5247 LOG:  pg_hint_plan:
5248 used hint:
5249 not used hint:
5250 duplication hint:
5251 error hint:
5252 NestLoop(t1 t2)
5253
5254                   QUERY PLAN                   
5255 -----------------------------------------------
5256  Merge Join
5257    Merge Cond: (public.t1.id = t2.id)
5258    ->  Merge Join
5259          Merge Cond: (public.t1.id = s0.t1.id)
5260          ->  Index Scan using t1_pkey on t1
5261          ->  Index Scan using t1_pkey on t1
5262    ->  Index Scan using t2_pkey on t2
5263 (7 rows)
5264
5265 /*+Leading(t1 t2 t1)*/
5266 EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id AND public.t1.id = t2.id;
5267 INFO:  hint syntax error at or near "Leading(t1 t2 t1)"
5268 DETAIL:  Relation name "t1" is ambiguous.
5269 LOG:  pg_hint_plan:
5270 used hint:
5271 not used hint:
5272 duplication hint:
5273 error hint:
5274 Leading(t1 t2 t1)
5275
5276                   QUERY PLAN                   
5277 -----------------------------------------------
5278  Merge Join
5279    Merge Cond: (public.t1.id = t2.id)
5280    ->  Merge Join
5281          Merge Cond: (public.t1.id = s0.t1.id)
5282          ->  Index Scan using t1_pkey on t1
5283          ->  Index Scan using t1_pkey on t1
5284    ->  Index Scan using t2_pkey on t2
5285 (7 rows)
5286
5287 -- identifier length test
5288 EXPLAIN (COSTS false) SELECT * FROM t1 "123456789012345678901234567890123456789012345678901234567890123" JOIN t2 ON ("123456789012345678901234567890123456789012345678901234567890123".id = t2.id) JOIN t3 ON (t2.id = t3.id);
5289                                                   QUERY PLAN                                                  
5290 --------------------------------------------------------------------------------------------------------------
5291  Merge Join
5292    Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t3.id)
5293    ->  Merge Join
5294          Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t2.id)
5295          ->  Index Scan using t1_pkey on t1 "123456789012345678901234567890123456789012345678901234567890123"
5296          ->  Index Scan using t2_pkey on t2
5297    ->  Sort
5298          Sort Key: t3.id
5299          ->  Seq Scan on t3
5300 (9 rows)
5301
5302 /*+
5303 Leading(123456789012345678901234567890123456789012345678901234567890123 t2 t3)
5304 SeqScan(123456789012345678901234567890123456789012345678901234567890123)
5305 MergeJoin(123456789012345678901234567890123456789012345678901234567890123 t2)
5306 Set(123456789012345678901234567890123456789012345678901234567890123 1)
5307 */
5308 EXPLAIN (COSTS false) SELECT * FROM t1 "123456789012345678901234567890123456789012345678901234567890123" JOIN t2 ON ("123456789012345678901234567890123456789012345678901234567890123".id = t2.id) JOIN t3 ON (t2.id = t3.id);
5309 INFO:  unrecognized configuration parameter "123456789012345678901234567890123456789012345678901234567890123"
5310 LOG:  pg_hint_plan:
5311 used hint:
5312 SeqScan(123456789012345678901234567890123456789012345678901234567890123)
5313 MergeJoin(123456789012345678901234567890123456789012345678901234567890123 t2)
5314 Leading(123456789012345678901234567890123456789012345678901234567890123 t2 t3)
5315 not used hint:
5316 duplication hint:
5317 error hint:
5318 Set(123456789012345678901234567890123456789012345678901234567890123 1)
5319
5320                                              QUERY PLAN                                             
5321 ----------------------------------------------------------------------------------------------------
5322  Merge Join
5323    Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t3.id)
5324    ->  Merge Join
5325          Merge Cond: (t2.id = "123456789012345678901234567890123456789012345678901234567890123".id)
5326          ->  Index Scan using t2_pkey on t2
5327          ->  Sort
5328                Sort Key: "123456789012345678901234567890123456789012345678901234567890123".id
5329                ->  Seq Scan on t1 "123456789012345678901234567890123456789012345678901234567890123"
5330    ->  Sort
5331          Sort Key: t3.id
5332          ->  Seq Scan on t3
5333 (11 rows)
5334
5335 /*+
5336 Leading(1234567890123456789012345678901234567890123456789012345678901234 t2 t3)
5337 SeqScan(1234567890123456789012345678901234567890123456789012345678901234)
5338 MergeJoin(1234567890123456789012345678901234567890123456789012345678901234 t2)
5339 Set(1234567890123456789012345678901234567890123456789012345678901234 1)
5340 Set(cursor_tuple_fraction 0.1234567890123456789012345678901234567890123456789012345678901234)
5341 */
5342 EXPLAIN (COSTS false) SELECT * FROM t1 "1234567890123456789012345678901234567890123456789012345678901234" JOIN t2 ON ("1234567890123456789012345678901234567890123456789012345678901234".id = t2.id) JOIN t3 ON (t2.id = t3.id);
5343 NOTICE:  identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5344 NOTICE:  identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5345 NOTICE:  identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5346 NOTICE:  identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5347 NOTICE:  identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5348 NOTICE:  identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5349 INFO:  unrecognized configuration parameter "123456789012345678901234567890123456789012345678901234567890123"
5350 LOG:  pg_hint_plan:
5351 used hint:
5352 SeqScan(123456789012345678901234567890123456789012345678901234567890123)
5353 MergeJoin(123456789012345678901234567890123456789012345678901234567890123 t2)
5354 Leading(123456789012345678901234567890123456789012345678901234567890123 t2 t3)
5355 Set(cursor_tuple_fraction 0.1234567890123456789012345678901234567890123456789012345678901234)
5356 not used hint:
5357 duplication hint:
5358 error hint:
5359 Set(123456789012345678901234567890123456789012345678901234567890123 1)
5360
5361                                              QUERY PLAN                                             
5362 ----------------------------------------------------------------------------------------------------
5363  Merge Join
5364    Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t3.id)
5365    ->  Merge Join
5366          Merge Cond: (t2.id = "123456789012345678901234567890123456789012345678901234567890123".id)
5367          ->  Index Scan using t2_pkey on t2
5368          ->  Sort
5369                Sort Key: "123456789012345678901234567890123456789012345678901234567890123".id
5370                ->  Seq Scan on t1 "123456789012345678901234567890123456789012345678901234567890123"
5371    ->  Sort
5372          Sort Key: t3.id
5373          ->  Seq Scan on t3
5374 (11 rows)
5375
5376 SET "123456789012345678901234567890123456789012345678901234567890123" TO 1;
5377 ERROR:  unrecognized configuration parameter "123456789012345678901234567890123456789012345678901234567890123"
5378 SET "1234567890123456789012345678901234567890123456789012345678901234" TO 1;
5379 NOTICE:  identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5380 ERROR:  unrecognized configuration parameter "123456789012345678901234567890123456789012345678901234567890123"
5381 SET cursor_tuple_fraction TO 1234567890123456789012345678901234567890123456789012345678901234;
5382 ERROR:  1.23457e+63 is outside the valid range for parameter "cursor_tuple_fraction" (0 .. 1)
5383 -- multi error
5384 /*+ Set(enable_seqscan 100)Set(seq_page_cost on)*/
5385 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
5386 INFO:  parameter "enable_seqscan" requires a Boolean value
5387 INFO:  parameter "seq_page_cost" requires a numeric value
5388 LOG:  pg_hint_plan:
5389 used hint:
5390 not used hint:
5391 duplication hint:
5392 error hint:
5393 Set(enable_seqscan 100)
5394 Set(seq_page_cost on)
5395
5396               QUERY PLAN              
5397 --------------------------------------
5398  Merge Join
5399    Merge Cond: (t1.id = t2.id)
5400    ->  Index Scan using t1_pkey on t1
5401    ->  Index Scan using t2_pkey on t2
5402 (4 rows)
5403
5404 -- debug log of candidate index to use IndexScan
5405 EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5406           QUERY PLAN           
5407 -------------------------------
5408  Index Scan using t5_id3 on t5
5409    Index Cond: (id = 1)
5410 (2 rows)
5411
5412 /*+IndexScan(t5 t5_id2)*/
5413 EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5414 LOG:  available indexes for IndexScan(t5): t5_id2
5415 LOG:  pg_hint_plan:
5416 used hint:
5417 IndexScan(t5 t5_id2)
5418 not used hint:
5419 duplication hint:
5420 error hint:
5421
5422           QUERY PLAN           
5423 -------------------------------
5424  Index Scan using t5_id2 on t5
5425    Index Cond: (id = 1)
5426 (2 rows)
5427
5428 /*+IndexScan(t5 no_exist)*/
5429 EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5430 LOG:  available indexes for IndexScan(t5):
5431 LOG:  pg_hint_plan:
5432 used hint:
5433 IndexScan(t5 no_exist)
5434 not used hint:
5435 duplication hint:
5436 error hint:
5437
5438      QUERY PLAN     
5439 --------------------
5440  Seq Scan on t5
5441    Filter: (id = 1)
5442 (2 rows)
5443
5444 /*+IndexScan(t5 t5_id1 t5_id2)*/
5445 EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5446 LOG:  available indexes for IndexScan(t5): t5_id2 t5_id1
5447 LOG:  pg_hint_plan:
5448 used hint:
5449 IndexScan(t5 t5_id1 t5_id2)
5450 not used hint:
5451 duplication hint:
5452 error hint:
5453
5454           QUERY PLAN           
5455 -------------------------------
5456  Index Scan using t5_id2 on t5
5457    Index Cond: (id = 1)
5458 (2 rows)
5459
5460 /*+IndexScan(t5 no_exist t5_id2)*/
5461 EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5462 LOG:  available indexes for IndexScan(t5): t5_id2
5463 LOG:  pg_hint_plan:
5464 used hint:
5465 IndexScan(t5 no_exist t5_id2)
5466 not used hint:
5467 duplication hint:
5468 error hint:
5469
5470           QUERY PLAN           
5471 -------------------------------
5472  Index Scan using t5_id2 on t5
5473    Index Cond: (id = 1)
5474 (2 rows)
5475
5476 /*+IndexScan(t5 no_exist5 no_exist2)*/
5477 EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5478 LOG:  available indexes for IndexScan(t5):
5479 LOG:  pg_hint_plan:
5480 used hint:
5481 IndexScan(t5 no_exist5 no_exist2)
5482 not used hint:
5483 duplication hint:
5484 error hint:
5485
5486      QUERY PLAN     
5487 --------------------
5488  Seq Scan on t5
5489    Filter: (id = 1)
5490 (2 rows)
5491
5492 -- outer inner
5493 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5494                        QUERY PLAN                       
5495 --------------------------------------------------------
5496  Hash Join
5497    Hash Cond: (t3.val = t2.val)
5498    ->  Seq Scan on t3
5499    ->  Hash
5500          ->  Hash Join
5501                Hash Cond: (t2.id = t1.id)
5502                ->  Seq Scan on t2
5503                ->  Hash
5504                      ->  Index Scan using t1_pkey on t1
5505                            Index Cond: (id < 10)
5506 (10 rows)
5507
5508 /*+Leading((t1))*/
5509 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5510 INFO:  hint syntax error at or near "Leading((t1))"
5511 DETAIL:  Leading hint requires two sets of relations when parentheses nests.
5512 LOG:  pg_hint_plan:
5513 used hint:
5514 not used hint:
5515 duplication hint:
5516 error hint:
5517 Leading((t1))
5518
5519                        QUERY PLAN                       
5520 --------------------------------------------------------
5521  Hash Join
5522    Hash Cond: (t3.val = t2.val)
5523    ->  Seq Scan on t3
5524    ->  Hash
5525          ->  Hash Join
5526                Hash Cond: (t2.id = t1.id)
5527                ->  Seq Scan on t2
5528                ->  Hash
5529                      ->  Index Scan using t1_pkey on t1
5530                            Index Cond: (id < 10)
5531 (10 rows)
5532
5533 /*+Leading((t1 t2))*/
5534 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5535 LOG:  pg_hint_plan:
5536 used hint:
5537 Leading((t1 t2))
5538 not used hint:
5539 duplication hint:
5540 error hint:
5541
5542                  QUERY PLAN                 
5543 --------------------------------------------
5544  Nested Loop
5545    Join Filter: (t2.val = t3.val)
5546    ->  Hash Join
5547          Hash Cond: (t1.id = t2.id)
5548          ->  Index Scan using t1_pkey on t1
5549                Index Cond: (id < 10)
5550          ->  Hash
5551                ->  Seq Scan on t2
5552    ->  Seq Scan on t3
5553 (9 rows)
5554
5555 /*+Leading((t1 t2 t3))*/
5556 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5557 INFO:  hint syntax error at or near "Leading((t1 t2 t3))"
5558 DETAIL:  Leading hint requires two sets of relations when parentheses nests.
5559 LOG:  pg_hint_plan:
5560 used hint:
5561 not used hint:
5562 duplication hint:
5563 error hint:
5564 Leading((t1 t2 t3))
5565
5566                        QUERY PLAN                       
5567 --------------------------------------------------------
5568  Hash Join
5569    Hash Cond: (t3.val = t2.val)
5570    ->  Seq Scan on t3
5571    ->  Hash
5572          ->  Hash Join
5573                Hash Cond: (t2.id = t1.id)
5574                ->  Seq Scan on t2
5575                ->  Hash
5576                      ->  Index Scan using t1_pkey on t1
5577                            Index Cond: (id < 10)
5578 (10 rows)
5579
5580 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.id < 10;
5581                  QUERY PLAN                 
5582 --------------------------------------------
5583  Hash Join
5584    Hash Cond: (t2.id = t1.id)
5585    ->  Seq Scan on t2
5586    ->  Hash
5587          ->  Index Scan using t1_pkey on t1
5588                Index Cond: (id < 10)
5589 (6 rows)
5590
5591 /*+Leading((t1 t2))*/
5592 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.id < 10;
5593 LOG:  pg_hint_plan:
5594 used hint:
5595 Leading((t1 t2))
5596 not used hint:
5597 duplication hint:
5598 error hint:
5599
5600               QUERY PLAN              
5601 --------------------------------------
5602  Hash Join
5603    Hash Cond: (t1.id = t2.id)
5604    ->  Index Scan using t1_pkey on t1
5605          Index Cond: (id < 10)
5606    ->  Hash
5607          ->  Seq Scan on t2
5608 (6 rows)
5609
5610 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5611                        QUERY PLAN                       
5612 --------------------------------------------------------
5613  Hash Join
5614    Hash Cond: (t3.val = t2.val)
5615    ->  Seq Scan on t3
5616    ->  Hash
5617          ->  Hash Join
5618                Hash Cond: (t2.id = t1.id)
5619                ->  Seq Scan on t2
5620                ->  Hash
5621                      ->  Index Scan using t1_pkey on t1
5622                            Index Cond: (id < 10)
5623 (10 rows)
5624
5625 /*+Leading(((t1 t2) t3))*/
5626 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5627 LOG:  pg_hint_plan:
5628 used hint:
5629 Leading(((t1 t2) t3))
5630 not used hint:
5631 duplication hint:
5632 error hint:
5633
5634                  QUERY PLAN                 
5635 --------------------------------------------
5636  Nested Loop
5637    Join Filter: (t2.val = t3.val)
5638    ->  Hash Join
5639          Hash Cond: (t1.id = t2.id)
5640          ->  Index Scan using t1_pkey on t1
5641                Index Cond: (id < 10)
5642          ->  Hash
5643                ->  Seq Scan on t2
5644    ->  Seq Scan on t3
5645 (9 rows)
5646
5647 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
5648                        QUERY PLAN                       
5649 --------------------------------------------------------
5650  Nested Loop
5651    ->  Merge Join
5652          Merge Cond: (t3.id = t4.id)
5653          ->  Nested Loop
5654                Join Filter: (t1.val = t3.val)
5655                ->  Index Scan using t3_pkey on t3
5656                ->  Materialize
5657                      ->  Index Scan using t1_pkey on t1
5658                            Index Cond: (id < 10)
5659          ->  Sort
5660                Sort Key: t4.id
5661                ->  Seq Scan on t4
5662    ->  Index Scan using t2_pkey on t2
5663          Index Cond: (id = t1.id)
5664 (14 rows)
5665
5666 /*+Leading((((t1 t2) t3) t4))*/
5667 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
5668 LOG:  pg_hint_plan:
5669 used hint:
5670 Leading((((t1 t2) t3) t4))
5671 not used hint:
5672 duplication hint:
5673 error hint:
5674
5675                     QUERY PLAN                    
5676 --------------------------------------------------
5677  Nested Loop
5678    ->  Nested Loop
5679          Join Filter: (t1.val = t3.val)
5680          ->  Hash Join
5681                Hash Cond: (t1.id = t2.id)
5682                ->  Index Scan using t1_pkey on t1
5683                      Index Cond: (id < 10)
5684                ->  Hash
5685                      ->  Seq Scan on t2
5686          ->  Seq Scan on t3
5687    ->  Index Scan using t4_pkey on t4
5688          Index Cond: (id = t3.id)
5689 (12 rows)
5690
5691 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5692                        QUERY PLAN                       
5693 --------------------------------------------------------
5694  Hash Join
5695    Hash Cond: (t3.val = t2.val)
5696    ->  Seq Scan on t3
5697    ->  Hash
5698          ->  Hash Join
5699                Hash Cond: (t2.id = t1.id)
5700                ->  Seq Scan on t2
5701                ->  Hash
5702                      ->  Index Scan using t1_pkey on t1
5703                            Index Cond: (id < 10)
5704 (10 rows)
5705
5706 /*+Leading(((t1 t2) t3))*/
5707 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5708 LOG:  pg_hint_plan:
5709 used hint:
5710 Leading(((t1 t2) t3))
5711 not used hint:
5712 duplication hint:
5713 error hint:
5714
5715                  QUERY PLAN                 
5716 --------------------------------------------
5717  Nested Loop
5718    Join Filter: (t2.val = t3.val)
5719    ->  Hash Join
5720          Hash Cond: (t1.id = t2.id)
5721          ->  Index Scan using t1_pkey on t1
5722                Index Cond: (id < 10)
5723          ->  Hash
5724                ->  Seq Scan on t2
5725    ->  Seq Scan on t3
5726 (9 rows)
5727
5728 /*+Leading((t1 (t2 t3)))*/
5729 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5730 LOG:  pg_hint_plan:
5731 used hint:
5732 Leading((t1 (t2 t3)))
5733 not used hint:
5734 duplication hint:
5735 error hint:
5736
5737                  QUERY PLAN                 
5738 --------------------------------------------
5739  Hash Join
5740    Hash Cond: (t1.id = t2.id)
5741    ->  Index Scan using t1_pkey on t1
5742          Index Cond: (id < 10)
5743    ->  Hash
5744          ->  Hash Join
5745                Hash Cond: (t2.val = t3.val)
5746                ->  Seq Scan on t2
5747                ->  Hash
5748                      ->  Seq Scan on t3
5749 (10 rows)
5750
5751 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
5752                        QUERY PLAN                       
5753 --------------------------------------------------------
5754  Nested Loop
5755    ->  Merge Join
5756          Merge Cond: (t3.id = t4.id)
5757          ->  Nested Loop
5758                Join Filter: (t1.val = t3.val)
5759                ->  Index Scan using t3_pkey on t3
5760                ->  Materialize
5761                      ->  Index Scan using t1_pkey on t1
5762                            Index Cond: (id < 10)
5763          ->  Sort
5764                Sort Key: t4.id
5765                ->  Seq Scan on t4
5766    ->  Index Scan using t2_pkey on t2
5767          Index Cond: (id = t1.id)
5768 (14 rows)
5769
5770 /*+Leading(((t1 t2) (t3 t4)))*/
5771 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
5772 LOG:  pg_hint_plan:
5773 used hint:
5774 Leading(((t1 t2) (t3 t4)))
5775 not used hint:
5776 duplication hint:
5777 error hint:
5778
5779                  QUERY PLAN                 
5780 --------------------------------------------
5781  Nested Loop
5782    Join Filter: (t1.val = t3.val)
5783    ->  Hash Join
5784          Hash Cond: (t1.id = t2.id)
5785          ->  Index Scan using t1_pkey on t1
5786                Index Cond: (id < 10)
5787          ->  Hash
5788                ->  Seq Scan on t2
5789    ->  Merge Join
5790          Merge Cond: (t3.id = t4.id)
5791          ->  Index Scan using t3_pkey on t3
5792          ->  Sort
5793                Sort Key: t4.id
5794                ->  Seq Scan on t4
5795 (14 rows)
5796
5797 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < ( SELECT t1_2.id FROM t1 t1_2, t2 t2_2 WHERE t1_2.id = t2_2.id AND t2_2.val > 100 ORDER BY t1_2.id LIMIT 1);
5798                           QUERY PLAN                           
5799 ---------------------------------------------------------------
5800  Hash Join
5801    Hash Cond: (t2.val = t3.val)
5802    InitPlan 1 (returns $1)
5803      ->  Limit
5804            ->  Sort
5805                  Sort Key: t1_2.id
5806                  ->  Nested Loop
5807                        ->  Index Scan using t2_val on t2 t2_2
5808                              Index Cond: (val > 100)
5809                        ->  Index Scan using t1_pkey on t1 t1_2
5810                              Index Cond: (id = t2_2.id)
5811    ->  Merge Join
5812          Merge Cond: (t1.id = t2.id)
5813          ->  Index Scan using t1_pkey on t1
5814                Index Cond: (id < $1)
5815          ->  Index Scan using t2_pkey on t2
5816    ->  Hash
5817          ->  Seq Scan on t3
5818 (18 rows)
5819
5820 /*+Leading(((t1 t2) t3)) Leading(((t3 t1) t2))*/
5821 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t1.val = t3.val AND t1.id < ( SELECT t1_2.id FROM t1 t1_2, t2 t2_2 WHERE t1_2.id = t2_2.id AND t2_2.val > 100 ORDER BY t1_2.id LIMIT 1);
5822 INFO:  hint syntax error at or near "Leading(((t1 t2) t3)) Leading(((t3 t1) t2))"
5823 DETAIL:  Conflict leading hint.
5824 LOG:  pg_hint_plan:
5825 used hint:
5826 Leading(((t3 t1) t2))
5827 not used hint:
5828 duplication hint:
5829 Leading(((t1 t2) t3))
5830 error hint:
5831
5832                           QUERY PLAN                           
5833 ---------------------------------------------------------------
5834  Hash Join
5835    Hash Cond: (t1.id = t2.id)
5836    InitPlan 1 (returns $1)
5837      ->  Limit
5838            ->  Sort
5839                  Sort Key: t1_2.id
5840                  ->  Nested Loop
5841                        ->  Index Scan using t2_val on t2 t2_2
5842                              Index Cond: (val > 100)
5843                        ->  Index Scan using t1_pkey on t1 t1_2
5844                              Index Cond: (id = t2_2.id)
5845    ->  Hash Join
5846          Hash Cond: (t3.val = t1.val)
5847          ->  Seq Scan on t3
5848          ->  Hash
5849                ->  Index Scan using t1_pkey on t1
5850                      Index Cond: (id < $1)
5851    ->  Hash
5852          ->  Seq Scan on t2
5853 (19 rows)
5854
5855 /*+Leading(((t1 t2) t3)) Leading((t1_2 t2_2))*/
5856 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < ( SELECT t1_2.id FROM t1 t1_2, t2 t2_2 WHERE t1_2.id = t2_2.id AND t2_2.val > 100 ORDER BY t1_2.id LIMIT 1);
5857 LOG:  pg_hint_plan:
5858 used hint:
5859 Leading(((t1 t2) t3))
5860 Leading((t1_2 t2_2))
5861 not used hint:
5862 duplication hint:
5863 error hint:
5864
5865                           QUERY PLAN                          
5866 --------------------------------------------------------------
5867  Hash Join
5868    Hash Cond: (t2.val = t3.val)
5869    InitPlan 1 (returns $0)
5870      ->  Limit
5871            ->  Merge Join
5872                  Merge Cond: (t1_2.id = t2_2.id)
5873                  ->  Index Scan using t1_pkey on t1 t1_2
5874                  ->  Sort
5875                        Sort Key: t2_2.id
5876                        ->  Index Scan using t2_val on t2 t2_2
5877                              Index Cond: (val > 100)
5878    ->  Merge Join
5879          Merge Cond: (t1.id = t2.id)
5880          ->  Index Scan using t1_pkey on t1
5881                Index Cond: (id < $0)
5882          ->  Index Scan using t2_pkey on t2
5883    ->  Hash
5884          ->  Seq Scan on t3
5885 (18 rows)
5886
5887 /*+Leading(((((t1 t2) t3) t1_2) t2_2))*/
5888 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < ( SELECT t1_2.id FROM t1 t1_2, t2 t2_2 WHERE t1_2.id = t2_2.id AND t2_2.val > 100 ORDER BY t1_2.id LIMIT 1);
5889 LOG:  pg_hint_plan:
5890 used hint:
5891 not used hint:
5892 Leading(((((t1 t2) t3) t1_2) t2_2))
5893 duplication hint:
5894 error hint:
5895
5896                           QUERY PLAN                           
5897 ---------------------------------------------------------------
5898  Hash Join
5899    Hash Cond: (t2.val = t3.val)
5900    InitPlan 1 (returns $1)
5901      ->  Limit
5902            ->  Sort
5903                  Sort Key: t1_2.id
5904                  ->  Nested Loop
5905                        ->  Index Scan using t2_val on t2 t2_2
5906                              Index Cond: (val > 100)
5907                        ->  Index Scan using t1_pkey on t1 t1_2
5908                              Index Cond: (id = t2_2.id)
5909    ->  Merge Join
5910          Merge Cond: (t1.id = t2.id)
5911          ->  Index Scan using t1_pkey on t1
5912                Index Cond: (id < $1)
5913          ->  Index Scan using t2_pkey on t2
5914    ->  Hash
5915          ->  Seq Scan on t3
5916 (18 rows)
5917
5918 -- Specified outer/inner leading hint and join method hint at the same time
5919 /*+Leading(((t1 t2) t3))*/
5920 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5921 LOG:  pg_hint_plan:
5922 used hint:
5923 Leading(((t1 t2) t3))
5924 not used hint:
5925 duplication hint:
5926 error hint:
5927
5928                  QUERY PLAN                 
5929 --------------------------------------------
5930  Nested Loop
5931    Join Filter: (t2.val = t3.val)
5932    ->  Hash Join
5933          Hash Cond: (t1.id = t2.id)
5934          ->  Index Scan using t1_pkey on t1
5935                Index Cond: (id < 10)
5936          ->  Hash
5937                ->  Seq Scan on t2
5938    ->  Seq Scan on t3
5939 (9 rows)
5940
5941 /*+Leading(((t1 t2) t3)) MergeJoin(t1 t2)*/
5942 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5943 LOG:  pg_hint_plan:
5944 used hint:
5945 MergeJoin(t1 t2)
5946 Leading(((t1 t2) t3))
5947 not used hint:
5948 duplication hint:
5949 error hint:
5950
5951                  QUERY PLAN                 
5952 --------------------------------------------
5953  Nested Loop
5954    Join Filter: (t2.val = t3.val)
5955    ->  Merge Join
5956          Merge Cond: (t1.id = t2.id)
5957          ->  Index Scan using t1_pkey on t1
5958                Index Cond: (id < 10)
5959          ->  Index Scan using t2_pkey on t2
5960    ->  Seq Scan on t3
5961 (8 rows)
5962
5963 /*+Leading(((t1 t2) t3)) MergeJoin(t1 t2 t3)*/
5964 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5965 LOG:  pg_hint_plan:
5966 used hint:
5967 MergeJoin(t1 t2 t3)
5968 Leading(((t1 t2) t3))
5969 not used hint:
5970 duplication hint:
5971 error hint:
5972
5973                     QUERY PLAN                    
5974 --------------------------------------------------
5975  Merge Join
5976    Merge Cond: (t2.val = t3.val)
5977    ->  Sort
5978          Sort Key: t2.val
5979          ->  Hash Join
5980                Hash Cond: (t1.id = t2.id)
5981                ->  Index Scan using t1_pkey on t1
5982                      Index Cond: (id < 10)
5983                ->  Hash
5984                      ->  Seq Scan on t2
5985    ->  Sort
5986          Sort Key: t3.val
5987          ->  Seq Scan on t3
5988 (13 rows)
5989
5990 /*+Leading(((t1 t2) t3)) MergeJoin(t1 t3)*/
5991 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5992 LOG:  pg_hint_plan:
5993 used hint:
5994 Leading(((t1 t2) t3))
5995 not used hint:
5996 MergeJoin(t1 t3)
5997 duplication hint:
5998 error hint:
5999
6000                  QUERY PLAN                 
6001 --------------------------------------------
6002  Nested Loop
6003    Join Filter: (t2.val = t3.val)
6004    ->  Hash Join
6005          Hash Cond: (t1.id = t2.id)
6006          ->  Index Scan using t1_pkey on t1
6007                Index Cond: (id < 10)
6008          ->  Hash
6009                ->  Seq Scan on t2
6010    ->  Seq Scan on t3
6011 (9 rows)
6012
6013 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
6014                        QUERY PLAN                       
6015 --------------------------------------------------------
6016  Nested Loop
6017    ->  Merge Join
6018          Merge Cond: (t3.id = t4.id)
6019          ->  Nested Loop
6020                Join Filter: (t1.val = t3.val)
6021                ->  Index Scan using t3_pkey on t3
6022                ->  Materialize
6023                      ->  Index Scan using t1_pkey on t1
6024                            Index Cond: (id < 10)
6025          ->  Sort
6026                Sort Key: t4.id
6027                ->  Seq Scan on t4
6028    ->  Index Scan using t2_pkey on t2
6029          Index Cond: (id = t1.id)
6030 (14 rows)
6031
6032 /*+Leading(((t1 t2) t3)) MergeJoin(t3 t4)*/
6033 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
6034 LOG:  pg_hint_plan:
6035 used hint:
6036 Leading(((t1 t2) t3))
6037 not used hint:
6038 MergeJoin(t3 t4)
6039 duplication hint:
6040 error hint:
6041
6042                     QUERY PLAN                    
6043 --------------------------------------------------
6044  Nested Loop
6045    ->  Nested Loop
6046          Join Filter: (t1.val = t3.val)
6047          ->  Hash Join
6048                Hash Cond: (t1.id = t2.id)
6049                ->  Index Scan using t1_pkey on t1
6050                      Index Cond: (id < 10)
6051                ->  Hash
6052                      ->  Seq Scan on t2
6053          ->  Seq Scan on t3
6054    ->  Index Scan using t4_pkey on t4
6055          Index Cond: (id = t3.id)
6056 (12 rows)
6057
6058 /*+Leading(((t1 t2) t3)) MergeJoin(t1 t2 t3 t4)*/
6059 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
6060 LOG:  pg_hint_plan:
6061 used hint:
6062 MergeJoin(t1 t2 t3 t4)
6063 Leading(((t1 t2) t3))
6064 not used hint:
6065 duplication hint:
6066 error hint:
6067
6068                        QUERY PLAN                       
6069 --------------------------------------------------------
6070  Merge Join
6071    Merge Cond: (t3.id = t4.id)
6072    ->  Sort
6073          Sort Key: t3.id
6074          ->  Nested Loop
6075                Join Filter: (t1.val = t3.val)
6076                ->  Hash Join
6077                      Hash Cond: (t1.id = t2.id)
6078                      ->  Index Scan using t1_pkey on t1
6079                            Index Cond: (id < 10)
6080                      ->  Hash
6081                            ->  Seq Scan on t2
6082                ->  Seq Scan on t3
6083    ->  Sort
6084          Sort Key: t4.id
6085          ->  Seq Scan on t4
6086 (16 rows)
6087
6088 /*+ Leading ( ( t1 ( t2 t3 ) ) ) */
6089 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6090 LOG:  pg_hint_plan:
6091 used hint:
6092 Leading((t1 (t2 t3)))
6093 not used hint:
6094 duplication hint:
6095 error hint:
6096
6097                  QUERY PLAN                 
6098 --------------------------------------------
6099  Hash Join
6100    Hash Cond: (t1.id = t2.id)
6101    ->  Index Scan using t1_pkey on t1
6102          Index Cond: (id < 10)
6103    ->  Hash
6104          ->  Hash Join
6105                Hash Cond: (t2.val = t3.val)
6106                ->  Seq Scan on t2
6107                ->  Hash
6108                      ->  Seq Scan on t3
6109 (10 rows)
6110
6111 /*+Leading((t1(t2 t3)))*/
6112 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6113 LOG:  pg_hint_plan:
6114 used hint:
6115 Leading((t1 (t2 t3)))
6116 not used hint:
6117 duplication hint:
6118 error hint:
6119
6120                  QUERY PLAN                 
6121 --------------------------------------------
6122  Hash Join
6123    Hash Cond: (t1.id = t2.id)
6124    ->  Index Scan using t1_pkey on t1
6125          Index Cond: (id < 10)
6126    ->  Hash
6127          ->  Hash Join
6128                Hash Cond: (t2.val = t3.val)
6129                ->  Seq Scan on t2
6130                ->  Hash
6131                      ->  Seq Scan on t3
6132 (10 rows)
6133
6134 /*+Leading(("t1(t2" "t3)"))*/
6135 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6136 LOG:  pg_hint_plan:
6137 used hint:
6138 not used hint:
6139 Leading(("t1(t2" "t3)"))
6140 duplication hint:
6141 error hint:
6142
6143                        QUERY PLAN                       
6144 --------------------------------------------------------
6145  Hash Join
6146    Hash Cond: (t3.val = t2.val)
6147    ->  Seq Scan on t3
6148    ->  Hash
6149          ->  Hash Join
6150                Hash Cond: (t2.id = t1.id)
6151                ->  Seq Scan on t2
6152                ->  Hash
6153                      ->  Index Scan using t1_pkey on t1
6154                            Index Cond: (id < 10)
6155 (10 rows)
6156
6157 /*+ Leading ( ( ( t1 t2 ) t3 ) ) */
6158 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6159 LOG:  pg_hint_plan:
6160 used hint:
6161 Leading(((t1 t2) t3))
6162 not used hint:
6163 duplication hint:
6164 error hint:
6165
6166                  QUERY PLAN                 
6167 --------------------------------------------
6168  Nested Loop
6169    Join Filter: (t2.val = t3.val)
6170    ->  Hash Join
6171          Hash Cond: (t1.id = t2.id)
6172          ->  Index Scan using t1_pkey on t1
6173                Index Cond: (id < 10)
6174          ->  Hash
6175                ->  Seq Scan on t2
6176    ->  Seq Scan on t3
6177 (9 rows)
6178
6179 /*+Leading(((t1 t2)t3))*/
6180 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6181 LOG:  pg_hint_plan:
6182 used hint:
6183 Leading(((t1 t2) t3))
6184 not used hint:
6185 duplication hint:
6186 error hint:
6187
6188                  QUERY PLAN                 
6189 --------------------------------------------
6190  Nested Loop
6191    Join Filter: (t2.val = t3.val)
6192    ->  Hash Join
6193          Hash Cond: (t1.id = t2.id)
6194          ->  Index Scan using t1_pkey on t1
6195                Index Cond: (id < 10)
6196          ->  Hash
6197                ->  Seq Scan on t2
6198    ->  Seq Scan on t3
6199 (9 rows)
6200
6201 /*+Leading(("(t1" "t2)t3"))*/
6202 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6203 LOG:  pg_hint_plan:
6204 used hint:
6205 not used hint:
6206 Leading(("(t1" "t2)t3"))
6207 duplication hint:
6208 error hint:
6209
6210                        QUERY PLAN                       
6211 --------------------------------------------------------
6212  Hash Join
6213    Hash Cond: (t3.val = t2.val)
6214    ->  Seq Scan on t3
6215    ->  Hash
6216          ->  Hash Join
6217                Hash Cond: (t2.id = t1.id)
6218                ->  Seq Scan on t2
6219                ->  Hash
6220                      ->  Index Scan using t1_pkey on t1
6221                            Index Cond: (id < 10)
6222 (10 rows)
6223
6224 /*+Leading((t1(t2(t3(t4 t5)))))*/
6225 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6226 LOG:  pg_hint_plan:
6227 used hint:
6228 Leading((t1 (t2 (t3 (t4 t5)))))
6229 not used hint:
6230 duplication hint:
6231 error hint:
6232
6233                                 QUERY PLAN                                
6234 --------------------------------------------------------------------------
6235  Merge Join
6236    Merge Cond: (t1.id = t2.id)
6237    ->  Index Scan using t1_pkey on t1
6238    ->  Materialize
6239          ->  Merge Join
6240                Merge Cond: (t2.id = t3.id)
6241                ->  Index Scan using t2_pkey on t2
6242                ->  Materialize
6243                      ->  Merge Join
6244                            Merge Cond: (t3.id = t4.id)
6245                            ->  Index Scan using t3_pkey on t3
6246                            ->  Materialize
6247                                  ->  Merge Join
6248                                        Merge Cond: (t4.id = t5.id)
6249                                        ->  Index Scan using t4_pkey on t4
6250                                        ->  Index Scan using t5_id3 on t5
6251 (16 rows)
6252
6253 /*+Leading((t5(t4(t3(t2 t1)))))*/
6254 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6255 LOG:  pg_hint_plan:
6256 used hint:
6257 Leading((t5 (t4 (t3 (t2 t1)))))
6258 not used hint:
6259 duplication hint:
6260 error hint:
6261
6262                                 QUERY PLAN                                
6263 --------------------------------------------------------------------------
6264  Hash Join
6265    Hash Cond: (t5.id = t1.id)
6266    ->  Seq Scan on t5
6267    ->  Hash
6268          ->  Merge Join
6269                Merge Cond: (t4.id = t1.id)
6270                ->  Sort
6271                      Sort Key: t4.id
6272                      ->  Seq Scan on t4
6273                ->  Materialize
6274                      ->  Merge Join
6275                            Merge Cond: (t3.id = t1.id)
6276                            ->  Sort
6277                                  Sort Key: t3.id
6278                                  ->  Seq Scan on t3
6279                            ->  Materialize
6280                                  ->  Merge Join
6281                                        Merge Cond: (t2.id = t1.id)
6282                                        ->  Index Scan using t2_pkey on t2
6283                                        ->  Index Scan using t1_pkey on t1
6284 (20 rows)
6285
6286 /*+Leading(((((t1 t2)t3)t4)t5))*/
6287 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6288 LOG:  pg_hint_plan:
6289 used hint:
6290 Leading(((((t1 t2) t3) t4) t5))
6291 not used hint:
6292 duplication hint:
6293 error hint:
6294
6295                        QUERY PLAN                       
6296 --------------------------------------------------------
6297  Nested Loop
6298    ->  Merge Join
6299          Merge Cond: (t1.id = t4.id)
6300          ->  Merge Join
6301                Merge Cond: (t1.id = t3.id)
6302                ->  Merge Join
6303                      Merge Cond: (t1.id = t2.id)
6304                      ->  Index Scan using t1_pkey on t1
6305                      ->  Index Scan using t2_pkey on t2
6306                ->  Index Scan using t3_pkey on t3
6307          ->  Sort
6308                Sort Key: t4.id
6309                ->  Seq Scan on t4
6310    ->  Index Scan using t5_id3 on t5
6311          Index Cond: (id = t1.id)
6312 (15 rows)
6313
6314 /*+Leading(((((t5 t4)t3)t2)t1))*/
6315 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6316 LOG:  pg_hint_plan:
6317 used hint:
6318 Leading(((((t5 t4) t3) t2) t1))
6319 not used hint:
6320 duplication hint:
6321 error hint:
6322
6323                       QUERY PLAN                       
6324 -------------------------------------------------------
6325  Nested Loop
6326    ->  Merge Join
6327          Merge Cond: (t3.id = t2.id)
6328          ->  Merge Join
6329                Merge Cond: (t4.id = t3.id)
6330                ->  Merge Join
6331                      Merge Cond: (t5.id = t4.id)
6332                      ->  Index Scan using t5_id3 on t5
6333                      ->  Sort
6334                            Sort Key: t4.id
6335                            ->  Seq Scan on t4
6336                ->  Index Scan using t3_pkey on t3
6337          ->  Index Scan using t2_pkey on t2
6338    ->  Index Scan using t1_pkey on t1
6339          Index Cond: (id = t2.id)
6340 (15 rows)
6341
6342 /*+Leading(((t1 t2)(t3(t4 t5))))*/
6343 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6344 LOG:  pg_hint_plan:
6345 used hint:
6346 Leading(((t1 t2) (t3 (t4 t5))))
6347 not used hint:
6348 duplication hint:
6349 error hint:
6350
6351                           QUERY PLAN                          
6352 --------------------------------------------------------------
6353  Merge Join
6354    Merge Cond: (t1.id = t3.id)
6355    ->  Merge Join
6356          Merge Cond: (t1.id = t2.id)
6357          ->  Index Scan using t1_pkey on t1
6358          ->  Index Scan using t2_pkey on t2
6359    ->  Materialize
6360          ->  Merge Join
6361                Merge Cond: (t3.id = t4.id)
6362                ->  Index Scan using t3_pkey on t3
6363                ->  Materialize
6364                      ->  Merge Join
6365                            Merge Cond: (t4.id = t5.id)
6366                            ->  Index Scan using t4_pkey on t4
6367                            ->  Index Scan using t5_id3 on t5
6368 (15 rows)
6369
6370 /*+Leading(((t5 t4)(t3(t2 t1))))*/
6371 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6372 LOG:  pg_hint_plan:
6373 used hint:
6374 Leading(((t5 t4) (t3 (t2 t1))))
6375 not used hint:
6376 duplication hint:
6377 error hint:
6378
6379                           QUERY PLAN                          
6380 --------------------------------------------------------------
6381  Merge Join
6382    Merge Cond: (t4.id = t1.id)
6383    ->  Merge Join
6384          Merge Cond: (t5.id = t4.id)
6385          ->  Index Scan using t5_id3 on t5
6386          ->  Sort
6387                Sort Key: t4.id
6388                ->  Seq Scan on t4
6389    ->  Materialize
6390          ->  Merge Join
6391                Merge Cond: (t3.id = t1.id)
6392                ->  Index Scan using t3_pkey on t3
6393                ->  Materialize
6394                      ->  Merge Join
6395                            Merge Cond: (t2.id = t1.id)
6396                            ->  Index Scan using t2_pkey on t2
6397                            ->  Index Scan using t1_pkey on t1
6398 (17 rows)
6399
6400 /*+Leading((((t1 t2)t3)(t4 t5)))*/
6401 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6402 LOG:  pg_hint_plan:
6403 used hint:
6404 Leading((((t1 t2) t3) (t4 t5)))
6405 not used hint:
6406 duplication hint:
6407 error hint:
6408
6409                     QUERY PLAN                    
6410 --------------------------------------------------
6411  Merge Join
6412    Merge Cond: (t1.id = t4.id)
6413    ->  Merge Join
6414          Merge Cond: (t1.id = t3.id)
6415          ->  Merge Join
6416                Merge Cond: (t1.id = t2.id)
6417                ->  Index Scan using t1_pkey on t1
6418                ->  Index Scan using t2_pkey on t2
6419          ->  Index Scan using t3_pkey on t3
6420    ->  Materialize
6421          ->  Merge Join
6422                Merge Cond: (t4.id = t5.id)
6423                ->  Index Scan using t4_pkey on t4
6424                ->  Index Scan using t5_id3 on t5
6425 (14 rows)
6426
6427 /*+Leading((((t5 t4)t3)(t2 t1)))*/
6428 EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6429 LOG:  pg_hint_plan:
6430 used hint:
6431 Leading((((t5 t4) t3) (t2 t1)))
6432 not used hint:
6433 duplication hint:
6434 error hint:
6435
6436                     QUERY PLAN                    
6437 --------------------------------------------------
6438  Merge Join
6439    Merge Cond: (t3.id = t1.id)
6440    ->  Merge Join
6441          Merge Cond: (t4.id = t3.id)
6442          ->  Merge Join
6443                Merge Cond: (t5.id = t4.id)
6444                ->  Index Scan using t5_id3 on t5
6445                ->  Sort
6446                      Sort Key: t4.id
6447                      ->  Seq Scan on t4
6448          ->  Index Scan using t3_pkey on t3
6449    ->  Materialize
6450          ->  Merge Join
6451                Merge Cond: (t2.id = t1.id)
6452                ->  Index Scan using t2_pkey on t2
6453                ->  Index Scan using t1_pkey on t1
6454 (16 rows)
6455