Re: Buffer usage detailed by RelKind in EXPLAIN ANALYZE BUFFERS

From: Andrey Borodin <amborodin86(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Buffer usage detailed by RelKind in EXPLAIN ANALYZE BUFFERS
Date: 2023-02-14 00:36:25
Message-ID: CAAhFRxjiRwTGe91BSe940x5EWS267RyO=9gfZ9z1_Ne63-YjFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 13, 2023 at 4:29 PM Andres Freund <andres(at)anarazel(dot)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.

Best regards, Andrey Borodin.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-02-14 00:38:01 Re: Inconsistency in reporting checkpointer stats
Previous Message Andres Freund 2023-02-14 00:33:06 Re: Make EXPLAIN generate a generic plan for a parameterized query