OSDN Git Service

planner_hookによるコメントのパース処理を追加
[pghintplan/pg_hint_plan.git] / expected / pg_hint_plan.out
1 EXPLAIN SELECT * FROM t1, t2 WHERE t1.id = t2.id;
2                                   QUERY PLAN                                  
3 ------------------------------------------------------------------------------
4  Merge Join  (cost=0.00..90.08 rows=1000 width=16)
5    Merge Cond: (t1.id = t2.id)
6    ->  Index Scan using t1_pkey on t1  (cost=0.00..318.26 rows=10000 width=8)
7    ->  Index Scan using t2_pkey on t2  (cost=0.00..43.25 rows=1000 width=8)
8 (4 rows)
9
10 EXPLAIN SELECT * FROM t1, t2 WHERE t1.val = t2.val;
11                                     QUERY PLAN                                     
12 -----------------------------------------------------------------------------------
13  Merge Join  (cost=0.00..1377.64 rows=100000 width=16)
14    Merge Cond: (t2.val = t1.val)
15    ->  Index Scan using t2_val on t2  (cost=0.00..55.12 rows=1000 width=8)
16    ->  Materialize  (cost=0.00..475.21 rows=10000 width=8)
17          ->  Index Scan using t1_val on t1  (cost=0.00..450.21 rows=10000 width=8)
18 (5 rows)
19
20 LOAD 'pg_hint_plan';
21 EXPLAIN SELECT * FROM t1, t2 WHERE t1.id = t2.id;
22                                   QUERY PLAN                                  
23 ------------------------------------------------------------------------------
24  Merge Join  (cost=0.00..90.08 rows=1000 width=16)
25    Merge Cond: (t1.id = t2.id)
26    ->  Index Scan using t1_pkey on t1  (cost=0.00..318.26 rows=10000 width=8)
27    ->  Index Scan using t2_pkey on t2  (cost=0.00..43.25 rows=1000 width=8)
28 (4 rows)
29
30 EXPLAIN SELECT * FROM t1, t2 WHERE t1.val = t2.val;
31                                     QUERY PLAN                                     
32 -----------------------------------------------------------------------------------
33  Merge Join  (cost=0.00..1377.64 rows=100000 width=16)
34    Merge Cond: (t2.val = t1.val)
35    ->  Index Scan using t2_val on t2  (cost=0.00..55.12 rows=1000 width=8)
36    ->  Materialize  (cost=0.00..475.21 rows=10000 width=8)
37          ->  Index Scan using t1_val on t1  (cost=0.00..450.21 rows=10000 width=8)
38 (5 rows)
39
40 /* Test (t1 t2) */
41 EXPLAIN SELECT * FROM t1, t2 WHERE t1.id = t2.id;
42 INFO:  hint syntax error at or near "Test (t1 t2) "
43 DETAIL:  Keyword "Test" does not exist.
44                                   QUERY PLAN                                  
45 ------------------------------------------------------------------------------
46  Merge Join  (cost=0.00..90.08 rows=1000 width=16)
47    Merge Cond: (t1.id = t2.id)
48    ->  Index Scan using t1_pkey on t1  (cost=0.00..318.26 rows=10000 width=8)
49    ->  Index Scan using t2_pkey on t2  (cost=0.00..43.25 rows=1000 width=8)
50 (4 rows)
51
52 SET pg_hint_plan.enable TO off;
53 /* Test (t1 t2) */
54 EXPLAIN SELECT * FROM t1, t2 WHERE t1.id = t2.id;
55                                   QUERY PLAN                                  
56 ------------------------------------------------------------------------------
57  Merge Join  (cost=0.00..90.08 rows=1000 width=16)
58    Merge Cond: (t1.id = t2.id)
59    ->  Index Scan using t1_pkey on t1  (cost=0.00..318.26 rows=10000 width=8)
60    ->  Index Scan using t2_pkey on t2  (cost=0.00..43.25 rows=1000 width=8)
61 (4 rows)
62
63 SET pg_hint_plan.enable TO on;
64 \q