OSDN Git Service

Rowsヒント句の比率指定(R-3-3-*)の試験を追加した。
authorTakashi Suzuki <suzuki.takashi@metrosystems.co.jp>
Fri, 17 Jan 2014 01:15:56 +0000 (10:15 +0900)
committerTakashi Suzuki <suzuki.takashi@metrosystems.co.jp>
Fri, 17 Jan 2014 01:15:56 +0000 (10:15 +0900)
expected/ut-R.out
sql/ut-R.sql

index 3e18406..a068632 100644 (file)
@@ -2253,3 +2253,49 @@ error hint:
 \o
 \! sed 's/cost=[\.0-9]*/cost=xxx/' results/R_3-2-3.out.log > results/R_3-2-3.out
 \! diff expected/R_3-2-3.out results/R_3-2-3.out
+----
+---- No. R-3-3 multiple 
+----
+-- No. R-3-3-1
+\o results/R_3-3-1.out.log
+/*+Rows(t1 t2 *0)*/
+EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
+WARNING:  make rows estimation 1 since below 1 : Rows(t1 t2 *0)
+LOG:  pg_hint_plan:
+used hint:
+Rows(t1 t2 *0)
+not used hint:
+duplication hint:
+error hint:
+
+\o
+\! sed 's/cost=[\.0-9]*/cost=xxx/' results/R_3-3-1.out.log > results/R_3-3-1.out
+\! diff expected/R_3-3-1.out results/R_3-3-1.out
+-- No. R-3-3-2
+\o results/R_3-3-2.out.log
+/*+Rows(t1 t2 *2)*/
+EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
+LOG:  pg_hint_plan:
+used hint:
+Rows(t1 t2 *2)
+not used hint:
+duplication hint:
+error hint:
+
+\o
+\! sed 's/cost=[\.0-9]*/cost=xxx/' results/R_3-3-2.out.log > results/R_3-3-2.out
+\! diff expected/R_3-3-2.out results/R_3-3-2.out
+-- No. R-3-3-3
+\o results/R_3-3-3.out.log
+/*+Rows(t1 t2 *0.1)*/
+EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
+LOG:  pg_hint_plan:
+used hint:
+Rows(t1 t2 *0.1)
+not used hint:
+duplication hint:
+error hint:
+
+\o
+\! sed 's/cost=[\.0-9]*/cost=xxx/' results/R_3-3-3.out.log > results/R_3-3-3.out
+\! diff expected/R_3-3-3.out results/R_3-3-3.out
index f194778..97805a5 100644 (file)
@@ -1128,3 +1128,31 @@ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
 \! sed 's/cost=[\.0-9]*/cost=xxx/' results/R_3-2-3.out.log > results/R_3-2-3.out
 \! diff expected/R_3-2-3.out results/R_3-2-3.out
 
+----
+---- No. R-3-3 multiple 
+----
+
+-- No. R-3-3-1
+\o results/R_3-3-1.out.log
+/*+Rows(t1 t2 *0)*/
+EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
+\o
+\! sed 's/cost=[\.0-9]*/cost=xxx/' results/R_3-3-1.out.log > results/R_3-3-1.out
+\! diff expected/R_3-3-1.out results/R_3-3-1.out
+
+-- No. R-3-3-2
+\o results/R_3-3-2.out.log
+/*+Rows(t1 t2 *2)*/
+EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
+\o
+\! sed 's/cost=[\.0-9]*/cost=xxx/' results/R_3-3-2.out.log > results/R_3-3-2.out
+\! diff expected/R_3-3-2.out results/R_3-3-2.out
+
+-- No. R-3-3-3
+\o results/R_3-3-3.out.log
+/*+Rows(t1 t2 *0.1)*/
+EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
+\o
+\! sed 's/cost=[\.0-9]*/cost=xxx/' results/R_3-3-3.out.log > results/R_3-3-3.out
+\! diff expected/R_3-3-3.out results/R_3-3-3.out
+