这是对上一个问题的评论的衍生:
使用 PostgreSQL 9.4,Recheck Cond:
在EXPLAIN
.
就像在EXPLAIN
引用问题的输出中一样:
Run Code Online (Sandbox Code Playgroud)-> 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)
或者在EXPLAIN ANALYZE
一个简单的大表(很少work_mem
)的输出中:
EXPLAIN ANALYZE …
Run Code Online (Sandbox Code Playgroud)