OSDN Git Service

Support "Memoize" Hint.
[pghintplan/pg_hint_plan.git] / doc / pg_hint_plan.html
index 8b2b6b0..dd640c7 100755 (executable)
@@ -18,7 +18,7 @@ pre { margin: 0 2em 0 2em; padding:0.3em; border-style: solid; border-width:0.1e
 </head>
 
 <body>
-<h1 id="pg_hint_plan">pg_hint_plan 1.3</h1>
+<h1 id="pg_hint_plan">pg_hint_plan 1.4</h1>
 <div class="navigation">
   <a href="pg_hint_plan.html">pg_hint_plan</a>
 </div>
@@ -153,6 +153,22 @@ during CREATE EXTENSION. Table hints are prioritized than comment hits.</p>
 <span class="strong">postgres-#</span>     JOIN table table3 t3 ON (t2.key = t3.key);
 </pre>
 
+<h4>Hint for restricting join behavior</h4>
+<p>This hint "Memoize" and "NoMemoize" allows and disallows a join to memoize the inner result. In the following example, The NoMemoize hint inhibits the topmost hash join from memoizing the result of table a.</p>
+<pre>
+postgres=# /*+ NoMemoize(a b) */
+EXPLAIN SELECT * FROM a, b WHERE a.val = b.val;
+                             QUERY PLAN                             
+--------------------------------------------------------------------
+ Hash Join  (cost=270.00..1412.50 rows=100000 width=16)
+   Hash Cond: (b.val = a.val)
+   ->  Seq Scan on b  (cost=0.00..15.00 rows=1000 width=8)
+   ->  Hash  (cost=145.00..145.00 rows=10000 width=8)
+         ->  Seq Scan on a  (cost=0.00..145.00 rows=10000 width=8)
+</pre>
+
+  
+
 <h4>Hint for row number correction</h4>
 <p>This hint "Rows" corrects row number misestimation of joins that comes from restrictions of the planner. </p>