Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE

From: David Geier <geidav(dot)pg(at)gmail(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE
Date: 2023-02-21 12:02:35
Message-ID: e7fe35e4-b5b1-2c61-65d6-0af341669b77@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 1/20/23 09:34, David Geier wrote:
> 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. The attached patch adds that functionality in the
> spirit of e.g. Sort or Memoize. Here is a simple test case and the
> EXPLAIN ANALYZE output with and without the patch:

Attached is a rebased version of the patch. I would appreciate someone
taking a look.

As background: the change doesn't come out of thin air. We repeatedly
took wrong conclusions in our query analysis because we assumed that the
reported block counts include the workers.

If no one objects I would also register the patch at the commit fest.
The patch is passing cleanly on CI.

--
David Geier
(ServiceNow)

Attachment Content-Type Size
v2-0001-Parallel-Bitmap-Heap-Scan-reports-per-worker-stat.patch text/x-patch 11.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2023-02-21 12:47:13 Re: meson logs environment
Previous Message Heikki Linnakangas 2023-02-21 11:40:57 Re: ResourceOwner refactoring