小编Jes*_*pez的帖子

“位图堆扫描”中的“堆块”是什么意思?

我有这个查询:

EXPLAIN (ANALYZE, BUFFERS) 
SELECT * FROM test
WHERE
    timestamp_range @> '2015-01-22 23:00:00'::timestamp
    AND data_int_array @> '{49, 61}'::integer[];
Run Code Online (Sandbox Code Playgroud)

哪些输出:

Bitmap Heap Scan on test  (cost=16.74..20.75 rows=1 width=113) (actual time=0.364..0.367 rows=2 loops=1)
  Recheck Cond: ((timestamp_range @> '2015-01-22 23:00:00'::timestamp without time zone) AND (data_int_array @> '{49,61}'::integer[]))
  Heap Blocks: exact=1
  Buffers: shared hit=8
  ->  BitmapAnd  (cost=16.74..16.74 rows=1 width=0) (actual time=0.351..0.351 rows=0 loops=1)
        Buffers: shared hit=7
        ->  Bitmap Index Scan on ix_test_interval  (cost=0.00..4.40 rows=17 width=0) (actual time=0.130..0.130 rows=12 loops=1)
              Index Cond: (timestamp_range @> '2015-01-22 …
Run Code Online (Sandbox Code Playgroud)

postgresql explain postgresql-9.4

10
推荐指数
1
解决办法
4657
查看次数

标签 统计

explain ×1

postgresql ×1

postgresql-9.4 ×1