Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE - Mailing list pgsql-hackers

From Michael Christofides
Subject Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE
Date
Msg-id CAFwT4nDDc+HOpGnwau5ys9ADqJ3gZfbRGomMRuiiQ=1ToXq3Mg@mail.gmail.com
Whole thread Raw
In response to Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE  (David Geier <geidav.pg@gmail.com>)
Responses Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE
List pgsql-hackers
 
EXPLAIN ANALYZE for parallel Bitmap Heap Scans currently only reports
the number of heap blocks processed by the leader. It's missing the
per-worker stats.

Hi David,

According to the docs[1]: "In a parallel bitmap heap scan, one process is chosen as the leader. That process performs a scan of one or more indexes and builds a bitmap indicating which table blocks need to be visited. These blocks are then divided among the cooperating processes as in a parallel sequential scan."

My understanding is that the "Heap Blocks" statistic is only reporting blocks for the bitmap (i.e. not the subsequent scan). As such, I think it is correct that the workers do not report additional exact heap blocks. 
 
explain (analyze, costs off, timing off) select * from foo where col0 >
900 or col1 = 1;

In your example, if you add the buffers and verbose parameters, do the worker reported buffers numbers report what you are looking for?

i.e. explain (analyze, buffers, verbose, costs off, timing off) select * from foo where col0 > 900 or col1 = 1;

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Improving Physical Backup/Restore within the Low Level API
Next
From: David Steele
Date:
Subject: Re: The danger of deleting backup_label