title: What does "Recheck Cond" in Explain result mean?
body: <p>From an example in PostgreSQL document:</p>
  
  <pre><code>EXPLAIN SELECT * FROM tenk1 WHERE unique1 &lt; 100 AND stringu1 = 'xxx';
                                    QUERY PLAN
  ------------------------------------------------------------------------------
   Bitmap Heap Scan on tenk1  (cost=5.04..229.43 rows=1 width=244)
     Recheck Cond: (unique1 &lt; 100)
     Filter: (stringu1 = 'xxx'::name)
     -&gt;  Bitmap Index Scan on tenk1_unique1  (cost=0.00..5.04 rows=101
   width=0)
           Index Cond: (unique1 &lt; 100)
  </code></pre>
  
  <p>Am I correct that </p>
  
  <ul>
  <li><p>first perform Bitmap Index Scan on all the rows for the first condition, and</p></li>
  <li><p>then on the returned rows, perform Bitmap Heap Scan for the second condition?</p></li>
  </ul>
  
  <p>Since Bitmap Index Scan already checks the Index Cond on unique1 &lt; 100, why is there "Recheck Cond" on the same condition again in Bitmp heap Scan?
  What does "Recheck Cond" mean? </p>
  
  <p>I am not sure I understand this related post <a href="https://dba.stackexchange.com/questions/106264/recheck-cond-line-in-query-plans-with-a-bitmap-index-scan">https://dba.stackexchange.com/questions/106264/recheck-cond-line-in-query-plans-with-a-bitmap-index-scan</a></p>
  
  <p>Thanks.</p>