OSDN Git Service

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