Re: Showing primitive index scan count in EXPLAIN ANALYZE (for skip scan and SAOP scans)

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Showing primitive index scan count in EXPLAIN ANALYZE (for skip scan and SAOP scans)
Date: 2024-08-28 13:52:38
Message-ID: CAH2-Wz=AEo4pRxgrcas_h9UBTeuDuoak1CkrtJb93XZgDPMopg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 28, 2024 at 9:49 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Wed, Aug 28, 2024 at 9:41 AM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> > On Wed, Aug 28, 2024 at 9:35 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > > > If you think it's important to have this info on all indexes then I'd
> > > > prefer the pgstat approach over adding a field in IndexScanDescData.
> > > > If instead you think that this is primarily important to expose for
> > > > nbtree index scans, then I'd prefer putting it in the BTSO using e.g.
> > > > the index AM analyze hook approach, as I think that's much more
> > > > elegant than this.
> > >
> > > I agree with this analysis. I don't see why IndexScanDesc would ever
> > > be the right place for this.
> >
> > Then what do you think is the right place?
>
> The paragraph that I agreed with and quoted in my reply, and that you
> then quoted in your reply to me, appears to me to address that exact
> question.

Are you talking about adding global counters, in the style of pgBufferUsage?

Or are you talking about adding it to BTSO? If it's the latter, then
why isn't that at least as bad? It's just the IndexScanDesc thing, but
with an additional indirection.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2024-08-28 13:54:12 Re: Showing primitive index scan count in EXPLAIN ANALYZE (for skip scan and SAOP scans)
Previous Message Robert Haas 2024-08-28 13:49:08 Re: Showing primitive index scan count in EXPLAIN ANALYZE (for skip scan and SAOP scans)