It is a potential re-check of the condition that is not always performed. Only if the bitmap is lossy (which EXPLAIN (ANALYZE) will indicate) the recheck is performed. A bitmap index scan becomes lossy if work_mem is not big enough to contain a bitmap that contains one bit per table row. It will then degrade to one bit per 8K page. Rows from such blocks will have to be rechecked. 正常情况下,postgresql执行计划如果采用bitmap,会每一行一个bit来创建bitmap,但是如果bitmap很大,以至于work_mem空间不够放下整个bitmap, postgresql将转为lossy style,即一个page一个bit来创建bitmap,如果是这种情况,bitmap中的page只是意味着包含满足条件的tuple或者row,这时就需要recheck从page中重新抽取出满足条件的行
|