OSDN Git Service

Merge branch 'master' into ut
[pghintplan/pg_hint_plan.git] / expected / ut-S.out
1 LOAD 'pg_hint_plan';
2 SET pg_hint_plan.enable TO on;
3 SET pg_hint_plan.debug_print TO on;
4 SET client_min_messages TO LOG;
5 SET search_path TO public;
6 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 >= 1;
7      QUERY PLAN      
8 ---------------------
9  Seq Scan on t1
10    Filter: (c1 >= 1)
11 (2 rows)
12
13 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
14            QUERY PLAN           
15 --------------------------------
16  Index Scan using t1_pkey on t1
17    Index Cond: (c1 = 1)
18 (2 rows)
19
20 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c3 < 10;
21            QUERY PLAN            
22 ---------------------------------
23  Bitmap Heap Scan on t1
24    Recheck Cond: (c3 < 10)
25    ->  Bitmap Index Scan on t1_i
26          Index Cond: (c3 < 10)
27 (4 rows)
28
29 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
30             QUERY PLAN             
31 -----------------------------------
32  Tid Scan on t1
33    TID Cond: (ctid = '(1,1)'::tid)
34    Filter: (c1 = 1)
35 (3 rows)
36
37 ----
38 ---- No. S-1-1 specified pattern of the object name
39 ----
40 -- No. S-1-1-1
41 /*+SeqScan(t1)*/
42 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
43 LOG:  pg_hint_plan:
44 used hint:
45 SeqScan(t1)
46 not used hint:
47 duplication hint:
48 error hint:
49
50      QUERY PLAN     
51 --------------------
52  Seq Scan on t1
53    Filter: (c1 = 1)
54 (2 rows)
55
56 -- No. S-1-1-2
57 /*+SeqScan(t1)*/
58 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t_1 WHERE t_1.c1 = 1;
59 LOG:  pg_hint_plan:
60 used hint:
61 not used hint:
62 SeqScan(t1)
63 duplication hint:
64 error hint:
65
66              QUERY PLAN             
67 ------------------------------------
68  Index Scan using t1_pkey on t1 t_1
69    Index Cond: (c1 = 1)
70 (2 rows)
71
72 -- No. S-1-1-3
73 /*+SeqScan(t_1)*/
74 EXPLAIN (COSTS false) SELECT * FROM s1.t1 t_1 WHERE t_1.c1 = 1;
75 LOG:  pg_hint_plan:
76 used hint:
77 SeqScan(t_1)
78 not used hint:
79 duplication hint:
80 error hint:
81
82      QUERY PLAN     
83 --------------------
84  Seq Scan on t1 t_1
85    Filter: (c1 = 1)
86 (2 rows)
87
88 ----
89 ---- No. S-1-2 specified schema name in the hint option
90 ----
91 -- No. S-1-2-1
92 /*+SeqScan(t1)*/
93 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
94 LOG:  pg_hint_plan:
95 used hint:
96 SeqScan(t1)
97 not used hint:
98 duplication hint:
99 error hint:
100
101      QUERY PLAN     
102 --------------------
103  Seq Scan on t1
104    Filter: (c1 = 1)
105 (2 rows)
106
107 -- No. S-1-2-2
108 /*+SeqScan(s1.t1)*/
109 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
110 LOG:  pg_hint_plan:
111 used hint:
112 not used hint:
113 SeqScan(s1.t1)
114 duplication hint:
115 error hint:
116
117            QUERY PLAN           
118 --------------------------------
119  Index Scan using t1_pkey on t1
120    Index Cond: (c1 = 1)
121 (2 rows)
122
123 ----
124 ---- No. S-1-3 table doesn't exist in the hint option
125 ----
126 -- No. S-1-3-1
127 /*+SeqScan(t1)*/
128 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
129 LOG:  pg_hint_plan:
130 used hint:
131 SeqScan(t1)
132 not used hint:
133 duplication hint:
134 error hint:
135
136      QUERY PLAN     
137 --------------------
138  Seq Scan on t1
139    Filter: (c1 = 1)
140 (2 rows)
141
142 -- No. S-1-3-2
143 /*+SeqScan(t2)*/
144 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
145 LOG:  pg_hint_plan:
146 used hint:
147 not used hint:
148 SeqScan(t2)
149 duplication hint:
150 error hint:
151
152            QUERY PLAN           
153 --------------------------------
154  Index Scan using t1_pkey on t1
155    Index Cond: (c1 = 1)
156 (2 rows)
157
158 ----
159 ---- No. S-1-4 conflict table name
160 ----
161 -- No. S-1-4-1
162 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = 1 AND t1.c1 = t2.c1;
163               QUERY PLAN              
164 --------------------------------------
165  Nested Loop
166    ->  Index Scan using t1_pkey on t1
167          Index Cond: (c1 = 1)
168    ->  Seq Scan on t2
169          Filter: (c1 = 1)
170 (5 rows)
171
172 /*+SeqScan(t1)*/
173 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = 1 AND t1.c1 = t2.c1;
174 LOG:  pg_hint_plan:
175 used hint:
176 SeqScan(t1)
177 not used hint:
178 duplication hint:
179 error hint:
180
181         QUERY PLAN        
182 --------------------------
183  Nested Loop
184    ->  Seq Scan on t1
185          Filter: (c1 = 1)
186    ->  Seq Scan on t2
187          Filter: (c1 = 1)
188 (5 rows)
189
190 -- No. S-1-4-2
191 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = 1 AND s1.t1.c1 = s2.t1.c1;
192               QUERY PLAN              
193 --------------------------------------
194  Nested Loop
195    ->  Index Scan using t1_pkey on t1
196          Index Cond: (c1 = 1)
197    ->  Seq Scan on t1
198          Filter: (c1 = 1)
199 (5 rows)
200
201 /*+IndexScan(t1)*/
202 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = 1 AND s1.t1.c1 = s2.t1.c1;
203 LOG:  pg_hint_plan:
204 used hint:
205 IndexScan(t1)
206 not used hint:
207 duplication hint:
208 error hint:
209
210               QUERY PLAN              
211 --------------------------------------
212  Nested Loop
213    ->  Index Scan using t1_pkey on t1
214          Index Cond: (c1 = 1)
215    ->  Index Scan using t1_pkey on t1
216          Index Cond: (c1 = 1)
217 (5 rows)
218
219 /*+SeqScan(t1)*/
220 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 s2t1 WHERE s1.t1.c1 = 1 AND s1.t1.c1 = s2t1.c1;
221 LOG:  pg_hint_plan:
222 used hint:
223 SeqScan(t1)
224 not used hint:
225 duplication hint:
226 error hint:
227
228         QUERY PLAN         
229 ---------------------------
230  Nested Loop
231    ->  Seq Scan on t1
232          Filter: (c1 = 1)
233    ->  Seq Scan on t1 s2t1
234          Filter: (c1 = 1)
235 (5 rows)
236
237 /*+BitmapScan(s2t1)*/
238 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 s2t1 WHERE s1.t1.c1 = 1 AND s1.t1.c1 = s2t1.c1;
239 LOG:  pg_hint_plan:
240 used hint:
241 BitmapScan(s2t1)
242 not used hint:
243 duplication hint:
244 error hint:
245
246                 QUERY PLAN                
247 ------------------------------------------
248  Nested Loop
249    ->  Index Scan using t1_pkey on t1
250          Index Cond: (c1 = 1)
251    ->  Bitmap Heap Scan on t1 s2t1
252          Recheck Cond: (c1 = 1)
253          ->  Bitmap Index Scan on t1_pkey
254                Index Cond: (c1 = 1)
255 (7 rows)
256
257 -- No. S-1-4-3
258 EXPLAIN (COSTS false) SELECT (SELECT max(c1) FROM s1.t1 WHERE s1.t1.c1 = 1) FROM s1.t1 WHERE s1.t1.c1 = 1;
259                              QUERY PLAN                              
260 ---------------------------------------------------------------------
261  Index Scan using t1_pkey on t1
262    Index Cond: (c1 = 1)
263    InitPlan 2 (returns $1)
264      ->  Result
265            InitPlan 1 (returns $0)
266              ->  Limit
267                    ->  Index Scan using t1_pkey on t1
268                          Index Cond: ((c1 IS NOT NULL) AND (c1 = 1))
269 (8 rows)
270
271 /*+SeqScan(t1)*/
272 EXPLAIN (COSTS false) SELECT (SELECT max(c1) FROM s1.t1 WHERE s1.t1.c1 = 1) FROM s1.t1 WHERE s1.t1.c1 = 1;
273 LOG:  pg_hint_plan:
274 used hint:
275 SeqScan(t1)
276 not used hint:
277 duplication hint:
278 error hint:
279
280                            QUERY PLAN                            
281 -----------------------------------------------------------------
282  Seq Scan on t1
283    Filter: (c1 = 1)
284    InitPlan 2 (returns $1)
285      ->  Result
286            InitPlan 1 (returns $0)
287              ->  Limit
288                    ->  Seq Scan on t1
289                          Filter: ((c1 IS NOT NULL) AND (c1 = 1))
290 (8 rows)
291
292 /*+SeqScan(t11)*/
293 EXPLAIN (COSTS false) SELECT (SELECT max(c1) FROM s1.t1 t11 WHERE t11.c1 = 1) FROM s1.t1 t12 WHERE t12.c1 = 1;
294 LOG:  pg_hint_plan:
295 used hint:
296 SeqScan(t11)
297 not used hint:
298 duplication hint:
299 error hint:
300
301                            QUERY PLAN                            
302 -----------------------------------------------------------------
303  Index Scan using t1_pkey on t1 t12
304    Index Cond: (c1 = 1)
305    InitPlan 2 (returns $1)
306      ->  Result
307            InitPlan 1 (returns $0)
308              ->  Limit
309                    ->  Seq Scan on t1 t11
310                          Filter: ((c1 IS NOT NULL) AND (c1 = 1))
311 (8 rows)
312
313 /*+SeqScan(t12)*/
314 EXPLAIN (COSTS false) SELECT (SELECT max(c1) FROM s1.t1 t11 WHERE t11.c1 = 1) FROM s1.t1 t12 WHERE t12.c1 = 1;
315 LOG:  pg_hint_plan:
316 used hint:
317 SeqScan(t12)
318 not used hint:
319 duplication hint:
320 error hint:
321
322                              QUERY PLAN                              
323 ---------------------------------------------------------------------
324  Seq Scan on t1 t12
325    Filter: (c1 = 1)
326    InitPlan 2 (returns $1)
327      ->  Result
328            InitPlan 1 (returns $0)
329              ->  Limit
330                    ->  Index Scan using t1_pkey on t1 t11
331                          Index Cond: ((c1 IS NOT NULL) AND (c1 = 1))
332 (8 rows)
333
334 ----
335 ---- No. S-1-5 object type for the hint
336 ----
337 -- No. S-1-5-1
338 /*+SeqScan(t1)*/
339 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
340 LOG:  pg_hint_plan:
341 used hint:
342 SeqScan(t1)
343 not used hint:
344 duplication hint:
345 error hint:
346
347      QUERY PLAN     
348 --------------------
349  Seq Scan on t1
350    Filter: (c1 = 1)
351 (2 rows)
352
353 -- No. S-1-5-2
354 EXPLAIN (COSTS false) SELECT * FROM s1.p1 WHERE p1.c1 = 1;
355            QUERY PLAN            
356 ---------------------------------
357  Result
358    ->  Append
359          ->  Seq Scan on p1
360                Filter: (c1 = 1)
361          ->  Seq Scan on p1c1 p1
362                Filter: (c1 = 1)
363 (6 rows)
364
365 /*+IndexScan(p1)*/
366 EXPLAIN (COSTS false) SELECT * FROM s1.p1 WHERE p1.c1 = 1;
367 LOG:  pg_hint_plan:
368 used hint:
369 IndexScan(p1)
370 not used hint:
371 duplication hint:
372 error hint:
373
374                     QUERY PLAN                     
375 ---------------------------------------------------
376  Result
377    ->  Append
378          ->  Index Scan using p1_pkey on p1
379                Index Cond: (c1 = 1)
380          ->  Index Scan using p1c1_pkey on p1c1 p1
381                Index Cond: (c1 = 1)
382 (6 rows)
383
384 -- No. S-1-5-3
385 EXPLAIN (COSTS false) SELECT * FROM s1.ul1 WHERE ul1.c1 = 1;
386             QUERY PLAN            
387 ----------------------------------
388  Index Scan using ul1_pkey on ul1
389    Index Cond: (c1 = 1)
390 (2 rows)
391
392 /*+SeqScan(ul1)*/
393 EXPLAIN (COSTS false) SELECT * FROM s1.ul1 WHERE ul1.c1 = 1;
394 LOG:  pg_hint_plan:
395 used hint:
396 SeqScan(ul1)
397 not used hint:
398 duplication hint:
399 error hint:
400
401      QUERY PLAN     
402 --------------------
403  Seq Scan on ul1
404    Filter: (c1 = 1)
405 (2 rows)
406
407 -- No. S-1-5-4
408 CREATE TEMP TABLE tm1 (LIKE s1.t1 INCLUDING ALL);
409 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "tm1_pkey" for table "tm1"
410 EXPLAIN (COSTS false) SELECT * FROM tm1 WHERE tm1.c1 = 1;
411             QUERY PLAN            
412 ----------------------------------
413  Index Scan using tm1_pkey on tm1
414    Index Cond: (c1 = 1)
415 (2 rows)
416
417 /*+SeqScan(tm1)*/
418 EXPLAIN (COSTS false) SELECT * FROM tm1 WHERE tm1.c1 = 1;
419 LOG:  pg_hint_plan:
420 used hint:
421 SeqScan(tm1)
422 not used hint:
423 duplication hint:
424 error hint:
425
426      QUERY PLAN     
427 --------------------
428  Seq Scan on tm1
429    Filter: (c1 = 1)
430 (2 rows)
431
432 -- No. S-1-5-5
433 EXPLAIN (COSTS false) SELECT * FROM pg_catalog.pg_class WHERE oid = 1;
434                    QUERY PLAN                    
435 -------------------------------------------------
436  Index Scan using pg_class_oid_index on pg_class
437    Index Cond: (oid = 1::oid)
438 (2 rows)
439
440 /*+SeqScan(pg_class)*/
441 EXPLAIN (COSTS false) SELECT * FROM pg_catalog.pg_class WHERE oid = 1;
442 LOG:  pg_hint_plan:
443 used hint:
444 SeqScan(pg_class)
445 not used hint:
446 duplication hint:
447 error hint:
448
449         QUERY PLAN        
450 --------------------------
451  Seq Scan on pg_class
452    Filter: (oid = 1::oid)
453 (2 rows)
454
455 -- No. S-1-5-6
456 -- refer fdw.sql
457 -- No. S-1-5-7
458 EXPLAIN (COSTS false) SELECT * FROM s1.f1() AS ft1 WHERE ft1.c1 = 1;
459        QUERY PLAN        
460 -------------------------
461  Function Scan on f1 ft1
462    Filter: (c1 = 1)
463 (2 rows)
464
465 /*+SeqScan(ft1)*/
466 EXPLAIN (COSTS false) SELECT * FROM s1.f1() AS ft1 WHERE ft1.c1 = 1;
467 LOG:  pg_hint_plan:
468 used hint:
469 not used hint:
470 SeqScan(ft1)
471 duplication hint:
472 error hint:
473
474        QUERY PLAN        
475 -------------------------
476  Function Scan on f1 ft1
477    Filter: (c1 = 1)
478 (2 rows)
479
480 -- No. S-1-5-8
481 EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS val1 (c1, c2, c3, c4) WHERE val1.c1 = 1;
482         QUERY PLAN         
483 ---------------------------
484  Values Scan on "*VALUES*"
485    Filter: (column1 = 1)
486 (2 rows)
487
488 /*+SeqScan(val1)*/
489 EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS val1 (c1, c2, c3, c4) WHERE val1.c1 = 1;
490 LOG:  pg_hint_plan:
491 used hint:
492 not used hint:
493 SeqScan(val1)
494 duplication hint:
495 error hint:
496
497         QUERY PLAN         
498 ---------------------------
499  Values Scan on "*VALUES*"
500    Filter: (column1 = 1)
501 (2 rows)
502
503 /*+SeqScan(*VALUES*)*/
504 EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS val1 (c1, c2, c3, c4) WHERE val1.c1 = 1;
505 LOG:  pg_hint_plan:
506 used hint:
507 not used hint:
508 SeqScan(*VALUES*)
509 duplication hint:
510 error hint:
511
512         QUERY PLAN         
513 ---------------------------
514  Values Scan on "*VALUES*"
515    Filter: (column1 = 1)
516 (2 rows)
517
518 -- No. S-1-5-9
519 EXPLAIN (COSTS false) WITH c1(c1) AS (SELECT max(c1) FROM s1.t1 WHERE t1.c1 = 1)
520 SELECT * FROM s1.t1, c1 WHERE t1.c1 = 1 AND t1.c1 = c1.c1;
521                              QUERY PLAN                              
522 ---------------------------------------------------------------------
523  Nested Loop
524    CTE c1
525      ->  Result
526            InitPlan 1 (returns $0)
527              ->  Limit
528                    ->  Index Scan using t1_pkey on t1
529                          Index Cond: ((c1 IS NOT NULL) AND (c1 = 1))
530    ->  Index Scan using t1_pkey on t1
531          Index Cond: (c1 = 1)
532    ->  CTE Scan on c1
533          Filter: (c1 = 1)
534 (11 rows)
535
536 /*+SeqScan(c1)*/
537 EXPLAIN (COSTS false) WITH c1(c1) AS (SELECT max(c1) FROM s1.t1 WHERE t1.c1 = 1)
538 SELECT * FROM s1.t1, c1 WHERE t1.c1 = 1 AND t1.c1 = c1.c1;
539 LOG:  pg_hint_plan:
540 used hint:
541 not used hint:
542 SeqScan(c1)
543 duplication hint:
544 error hint:
545
546                              QUERY PLAN                              
547 ---------------------------------------------------------------------
548  Nested Loop
549    CTE c1
550      ->  Result
551            InitPlan 1 (returns $0)
552              ->  Limit
553                    ->  Index Scan using t1_pkey on t1
554                          Index Cond: ((c1 IS NOT NULL) AND (c1 = 1))
555    ->  Index Scan using t1_pkey on t1
556          Index Cond: (c1 = 1)
557    ->  CTE Scan on c1
558          Filter: (c1 = 1)
559 (11 rows)
560
561 -- No. S-1-5-10
562 EXPLAIN (COSTS false) SELECT * FROM s1.v1 WHERE v1.c1 = 1;
563              QUERY PLAN              
564 -------------------------------------
565  Index Scan using t1_pkey on t1 v1t1
566    Index Cond: (c1 = 1)
567 (2 rows)
568
569 /*+SeqScan(v1)*/
570 EXPLAIN (COSTS false) SELECT * FROM s1.v1 WHERE v1.c1 = 1;
571 LOG:  pg_hint_plan:
572 used hint:
573 not used hint:
574 SeqScan(v1)
575 duplication hint:
576 error hint:
577
578              QUERY PLAN              
579 -------------------------------------
580  Index Scan using t1_pkey on t1 v1t1
581    Index Cond: (c1 = 1)
582 (2 rows)
583
584 -- No. S-1-5-11
585 EXPLAIN (COSTS false) SELECT * FROM (SELECT * FROM s1.t1 WHERE t1.c1 = 1) AS s1 WHERE s1.c1 = 1;
586            QUERY PLAN           
587 --------------------------------
588  Index Scan using t1_pkey on t1
589    Index Cond: (c1 = 1)
590 (2 rows)
591
592 /*+SeqScan(s1)*/
593 EXPLAIN (COSTS false) SELECT * FROM (SELECT * FROM s1.t1 WHERE t1.c1 = 1) AS s1 WHERE s1.c1 = 1;
594 LOG:  pg_hint_plan:
595 used hint:
596 not used hint:
597 SeqScan(s1)
598 duplication hint:
599 error hint:
600
601            QUERY PLAN           
602 --------------------------------
603  Index Scan using t1_pkey on t1
604    Index Cond: (c1 = 1)
605 (2 rows)
606
607 ----
608 ---- No. S-3-1 scan method hint
609 ----
610 -- No. S-3-1-1
611 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 >= 1;
612      QUERY PLAN      
613 ---------------------
614  Seq Scan on t1
615    Filter: (c1 >= 1)
616 (2 rows)
617
618 /*+SeqScan(t1)*/
619 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 >= 1;
620 LOG:  pg_hint_plan:
621 used hint:
622 SeqScan(t1)
623 not used hint:
624 duplication hint:
625 error hint:
626
627      QUERY PLAN      
628 ---------------------
629  Seq Scan on t1
630    Filter: (c1 >= 1)
631 (2 rows)
632
633 -- No. S-3-1-2
634 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
635            QUERY PLAN           
636 --------------------------------
637  Index Scan using t1_pkey on t1
638    Index Cond: (c1 = 1)
639 (2 rows)
640
641 /*+SeqScan(t1)*/
642 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
643 LOG:  pg_hint_plan:
644 used hint:
645 SeqScan(t1)
646 not used hint:
647 duplication hint:
648 error hint:
649
650      QUERY PLAN     
651 --------------------
652  Seq Scan on t1
653    Filter: (c1 = 1)
654 (2 rows)
655
656 -- No. S-3-1-3
657 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
658            QUERY PLAN           
659 --------------------------------
660  Index Scan using t1_pkey on t1
661    Index Cond: (c1 = 1)
662 (2 rows)
663
664 /*+IndexScan(t1)*/
665 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
666 LOG:  pg_hint_plan:
667 used hint:
668 IndexScan(t1)
669 not used hint:
670 duplication hint:
671 error hint:
672
673            QUERY PLAN           
674 --------------------------------
675  Index Scan using t1_pkey on t1
676    Index Cond: (c1 = 1)
677 (2 rows)
678
679 -- No. S-3-1-4
680 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 >= 1;
681      QUERY PLAN      
682 ---------------------
683  Seq Scan on t1
684    Filter: (c1 >= 1)
685 (2 rows)
686
687 /*+IndexScan(t1)*/
688 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 >= 1;
689 LOG:  pg_hint_plan:
690 used hint:
691 IndexScan(t1)
692 not used hint:
693 duplication hint:
694 error hint:
695
696            QUERY PLAN           
697 --------------------------------
698  Index Scan using t1_pkey on t1
699    Index Cond: (c1 >= 1)
700 (2 rows)
701
702 -- No. S-3-1-5
703 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c3 < 10;
704            QUERY PLAN            
705 ---------------------------------
706  Bitmap Heap Scan on t1
707    Recheck Cond: (c3 < 10)
708    ->  Bitmap Index Scan on t1_i
709          Index Cond: (c3 < 10)
710 (4 rows)
711
712 /*+BitmapScan(t1)*/
713 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c3 < 10;
714 LOG:  pg_hint_plan:
715 used hint:
716 BitmapScan(t1)
717 not used hint:
718 duplication hint:
719 error hint:
720
721            QUERY PLAN            
722 ---------------------------------
723  Bitmap Heap Scan on t1
724    Recheck Cond: (c3 < 10)
725    ->  Bitmap Index Scan on t1_i
726          Index Cond: (c3 < 10)
727 (4 rows)
728
729 -- No. S-3-1-6
730 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
731            QUERY PLAN           
732 --------------------------------
733  Index Scan using t1_pkey on t1
734    Index Cond: (c1 = 1)
735 (2 rows)
736
737 /*+BitmapScan(t1)*/
738 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
739 LOG:  pg_hint_plan:
740 used hint:
741 BitmapScan(t1)
742 not used hint:
743 duplication hint:
744 error hint:
745
746              QUERY PLAN             
747 ------------------------------------
748  Bitmap Heap Scan on t1
749    Recheck Cond: (c1 = 1)
750    ->  Bitmap Index Scan on t1_pkey
751          Index Cond: (c1 = 1)
752 (4 rows)
753
754 -- No. S-3-1-7
755 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
756             QUERY PLAN             
757 -----------------------------------
758  Tid Scan on t1
759    TID Cond: (ctid = '(1,1)'::tid)
760    Filter: (c1 = 1)
761 (3 rows)
762
763 /*+TidScan(t1)*/
764 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
765 LOG:  pg_hint_plan:
766 used hint:
767 TidScan(t1)
768 not used hint:
769 duplication hint:
770 error hint:
771
772             QUERY PLAN             
773 -----------------------------------
774  Tid Scan on t1
775    TID Cond: (ctid = '(1,1)'::tid)
776    Filter: (c1 = 1)
777 (3 rows)
778
779 -- No. S-3-1-8
780 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid IN ('(1,1)', '(2,2)', '(3,3)');
781                          QUERY PLAN                          
782 -------------------------------------------------------------
783  Index Scan using t1_pkey on t1
784    Index Cond: (c1 = 1)
785    Filter: (ctid = ANY ('{"(1,1)","(2,2)","(3,3)"}'::tid[]))
786 (3 rows)
787
788 /*+TidScan(t1)*/
789 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid IN ('(1,1)', '(2,2)', '(3,3)');
790 LOG:  pg_hint_plan:
791 used hint:
792 TidScan(t1)
793 not used hint:
794 duplication hint:
795 error hint:
796
797                           QUERY PLAN                           
798 ---------------------------------------------------------------
799  Tid Scan on t1
800    TID Cond: (ctid = ANY ('{"(1,1)","(2,2)","(3,3)"}'::tid[]))
801    Filter: (c1 = 1)
802 (3 rows)
803
804 -- No. S-3-1-9
805 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 >= 1;
806      QUERY PLAN      
807 ---------------------
808  Seq Scan on t1
809    Filter: (c1 >= 1)
810 (2 rows)
811
812 /*+NoSeqScan(t1)*/
813 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 >= 1;
814 LOG:  pg_hint_plan:
815 used hint:
816 NoSeqScan(t1)
817 not used hint:
818 duplication hint:
819 error hint:
820
821            QUERY PLAN           
822 --------------------------------
823  Index Scan using t1_pkey on t1
824    Index Cond: (c1 >= 1)
825 (2 rows)
826
827 -- No. S-3-1-10
828 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
829            QUERY PLAN           
830 --------------------------------
831  Index Scan using t1_pkey on t1
832    Index Cond: (c1 = 1)
833 (2 rows)
834
835 /*+NoSeqScan(t1)*/
836 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
837 LOG:  pg_hint_plan:
838 used hint:
839 NoSeqScan(t1)
840 not used hint:
841 duplication hint:
842 error hint:
843
844            QUERY PLAN           
845 --------------------------------
846  Index Scan using t1_pkey on t1
847    Index Cond: (c1 = 1)
848 (2 rows)
849
850 -- No. S-3-1-11
851 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
852            QUERY PLAN           
853 --------------------------------
854  Index Scan using t1_pkey on t1
855    Index Cond: (c1 = 1)
856 (2 rows)
857
858 /*+NoIndexScan(t1)*/
859 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
860 LOG:  pg_hint_plan:
861 used hint:
862 NoIndexScan(t1)
863 not used hint:
864 duplication hint:
865 error hint:
866
867              QUERY PLAN             
868 ------------------------------------
869  Bitmap Heap Scan on t1
870    Recheck Cond: (c1 = 1)
871    ->  Bitmap Index Scan on t1_pkey
872          Index Cond: (c1 = 1)
873 (4 rows)
874
875 -- No. S-3-1-12
876 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 >= 1;
877      QUERY PLAN      
878 ---------------------
879  Seq Scan on t1
880    Filter: (c1 >= 1)
881 (2 rows)
882
883 /*+NoIndexScan(t1)*/
884 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 >= 1;
885 LOG:  pg_hint_plan:
886 used hint:
887 NoIndexScan(t1)
888 not used hint:
889 duplication hint:
890 error hint:
891
892      QUERY PLAN      
893 ---------------------
894  Seq Scan on t1
895    Filter: (c1 >= 1)
896 (2 rows)
897
898 -- No. S-3-1-13
899 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c3 < 10;
900            QUERY PLAN            
901 ---------------------------------
902  Bitmap Heap Scan on t1
903    Recheck Cond: (c3 < 10)
904    ->  Bitmap Index Scan on t1_i
905          Index Cond: (c3 < 10)
906 (4 rows)
907
908 /*+NoBitmapScan(t1)*/
909 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c3 < 10;
910 LOG:  pg_hint_plan:
911 used hint:
912 NoBitmapScan(t1)
913 not used hint:
914 duplication hint:
915 error hint:
916
917      QUERY PLAN      
918 ---------------------
919  Seq Scan on t1
920    Filter: (c3 < 10)
921 (2 rows)
922
923 -- No. S-3-1-14
924 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
925            QUERY PLAN           
926 --------------------------------
927  Index Scan using t1_pkey on t1
928    Index Cond: (c1 = 1)
929 (2 rows)
930
931 /*+NoBitmapScan(t1)*/
932 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
933 LOG:  pg_hint_plan:
934 used hint:
935 NoBitmapScan(t1)
936 not used hint:
937 duplication hint:
938 error hint:
939
940            QUERY PLAN           
941 --------------------------------
942  Index Scan using t1_pkey on t1
943    Index Cond: (c1 = 1)
944 (2 rows)
945
946 -- No. S-3-1-15
947 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
948             QUERY PLAN             
949 -----------------------------------
950  Tid Scan on t1
951    TID Cond: (ctid = '(1,1)'::tid)
952    Filter: (c1 = 1)
953 (3 rows)
954
955 /*+NoTidScan(t1)*/
956 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
957 LOG:  pg_hint_plan:
958 used hint:
959 NoTidScan(t1)
960 not used hint:
961 duplication hint:
962 error hint:
963
964            QUERY PLAN            
965 ---------------------------------
966  Index Scan using t1_pkey on t1
967    Index Cond: (c1 = 1)
968    Filter: (ctid = '(1,1)'::tid)
969 (3 rows)
970
971 -- No. S-3-1-16
972 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
973            QUERY PLAN           
974 --------------------------------
975  Index Scan using t1_pkey on t1
976    Index Cond: (c1 = 1)
977 (2 rows)
978
979 /*+NoTidScan(t1)*/
980 EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
981 LOG:  pg_hint_plan:
982 used hint:
983 NoTidScan(t1)
984 not used hint:
985 duplication hint:
986 error hint:
987
988            QUERY PLAN           
989 --------------------------------
990  Index Scan using t1_pkey on t1
991    Index Cond: (c1 = 1)
992 (2 rows)
993