No exact/lossy block information in EXPLAIN ANALYZE for a bitmap heap scan

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: No exact/lossy block information in EXPLAIN ANALYZE for a bitmap heap scan
Date: 2014-07-11 08:45:33
Message-ID: 53BFA42D.2050201@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've noticed that EXPLAIN ANALYZE shows no information on exact/lossy
blocks for a bitmap heap scan when both the numbers of exact/lossy pages
retrieved by the node are zero. Such an example is shown below. I
think it would be better to suppress the 'Heap Blocks' line in that
case, based on the same idea of the 'Buffers' line. Patch attached.

postgres=# explain (analyze, verbose, buffers) select * from test where
id < 10;
QUERY PLAN
------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on public.test (cost=4.29..8.31 rows=1 width=29)
(actual time=0.006..0.006 rows=0 loops=1)
Output: id, inserted, data
Recheck Cond: (test.id < 10)
Heap Blocks:
Buffers: shared hit=2
-> Bitmap Index Scan on test_pkey (cost=0.00..4.29 rows=1 width=0)
(actual time=0.003..0.003 rows=0 loops=1)
Index Cond: (test.id < 10)
Buffers: shared hit=2
Planning time: 0.118 ms
Execution time: 0.027 ms
(10 rows)

Thanks,

Best regards,
Etsuro Fujita

Attachment Content-Type Size
explain-bitmapscan.patch text/x-diff 1.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-07-11 08:55:53 Re: RLS Design
Previous Message Ali Akbar 2014-07-11 08:36:55 Re: [REVIEW] Re: Fix xpath() to return namespace definitions