相关疑难解决方法(0)

带有位图索引扫描的查询计划中的“重新检查条件:”行

这是对上一个问题的评论的衍生:

使用 PostgreSQL 9.4,Recheck Cond:EXPLAIN.

就像在EXPLAIN引用问题的输出中一样:

->  Bitmap Heap Scan on table_three  (cost=2446.92..19686.74 rows=8159 width=7)
      Recheck Cond: (("timestamp" > (now() - '30 days'::interval)) AND (client_id > 0))
      ->  BitmapAnd  (cost=2446.92..2446.92 rows=8159 width=0)
            ->  Bitmap Index Scan on table_one_timestamp_idx  (cost=0.00..1040.00 rows=79941 width=0)
                  Index Cond: ("timestamp" > (now() - '30 days'::interval))
            ->  Bitmap Index Scan on fki_table_three_client_id  (cost=0.00..1406.05 rows=107978 width=0)
                  Index Cond: (client_id > 0)
Run Code Online (Sandbox Code Playgroud)

或者在EXPLAIN ANALYZE一个简单的大表(很少work_mem)的输出中:

EXPLAIN ANALYZE …
Run Code Online (Sandbox Code Playgroud)

postgresql index execution-plan postgresql-9.4

26
推荐指数
2
解决办法
1万
查看次数