Re: Buffer usage detailed by RelKind in EXPLAIN ANALYZE BUFFERS - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Buffer usage detailed by RelKind in EXPLAIN ANALYZE BUFFERS
Date
Msg-id 20230214003946.55zbbtnt3qfjkmpw@awork3.anarazel.de
Whole thread Raw
In response to Re: Buffer usage detailed by RelKind in EXPLAIN ANALYZE BUFFERS  (Andrey Borodin <amborodin86@gmail.com>)
Responses Re: Buffer usage detailed by RelKind in EXPLAIN ANALYZE BUFFERS
List pgsql-hackers
Hi,

On 2023-02-13 16:36:25 -0800, Andrey Borodin wrote:
> On Mon, Feb 13, 2023 at 4:29 PM Andres Freund <andres@anarazel.de> wrote:
> > > 1. Some more increments on hot paths. We have to add this tiny toll to
> > > every single buffer hit, but it will be seldom of any use.
> >
> > Additionally, I bet it slows down EXPLAIN (ANALYZE, BUFFERS) noticeably. It's
> > already quite expensive...
> >
> 
> I think collection of instrumentation is done unconditionally.
> We always do that
> pgBufferUsage.shared_blks_hit++;
> when the buffer is in shared_buffers.

The problem I'm talking about is the increased overhead in InstrStopNode(),
due to BufferUsageAccumDiff() getting more expensive.

Andres



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Adding "large" to PG_TEST_EXTRA
Next
From: Andres Freund
Date:
Subject: Re: Adding "large" to PG_TEST_EXTRA