pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: On disable_cost
Date: Fri, 27 Sep 2024 10:42:32 +0200
Message-ID: <9e4ad616bebb103ec2084bf6f724cfc739e7fabb.camel@cybertec.at> (raw)
In-Reply-To: <CA+TgmoYhGYHGw+TKSJc=VjmMF897nG8X8kydoX7TaPOJhcB8PA@mail.gmail.com>
References: <CAO0i4_SSPV9TVxbbTRVLOnCyewopcc147fBZy=f2ABk15eHS+g@mail.gmail.com>
	<CA+TgmobVH2zMh1ydAHdZzVYxbK-MNrs_R0hTOZbp=gu2abydaA@mail.gmail.com>
	<CAApHDvoREwVZMzu6uNJDvq-p4G6kL69xkSZwjp4c4rdKpqQmmg@mail.gmail.com>
	<CA+TgmoZ7LOTtQgWmEgSUSnVkBiiOyJ5SMQAqCvpJsPr7baTfzw@mail.gmail.com>
	<CAH2-Wzn7t3KZEwDwMFrXzpZKKyKARtpMxmjvUvjOjVRpyQh-Fw@mail.gmail.com>
	<CA+TgmoYUQq3C8Uo-YdDapo2vv84+XqsVi3J2R1RFGC0rf-bkgA@mail.gmail.com>
	<CA+Tgmoaow5wsubUvbn3GUosL6-opRG1Do5p8Q1Dj--OudUTWJQ@mail.gmail.com>
	<CA+TgmoY7kBhu1ykintHQd-NmpFS=TqmuH=gcn9ZQ-Y5OSyH+8w@mail.gmail.com>
	<591b3596-2ea0-4b8e-99c6-fad0ef2801f5@iki.fi>
	<CA+TgmoYiWfNq-oByseKphKn+GWZhL55PwOtSZ87NBE1CVYX7GQ@mail.gmail.com>
	<3114837.1719942038@sss.pgh.pa.us>
	<CA+TgmoaX3DS0uDMZh+U7qi6BnFGJ2pC8TLXDrVkYf=-3cq2vbQ@mail.gmail.com>
	<3121096.1719945445@sss.pgh.pa.us>
	<CA+Tgmoa-nn+jypLTiG1BzOHLL1O-heSzyCrPPbw=Ah7McEex4A@mail.gmail.com>
	<3127390.1719949016@sss.pgh.pa.us>
	<708d5715-bc5a-485a-a437-383a1298f5aa@iki.fi>
	<CAApHDvrTWY+5TrDs4PDeRAMXdP+mE0QGFR5OiBjLB-oOLj9v8A@mail.gmail.com>
	<CA+TgmoZ_+MS+o6NeGK2xyBv-xM+w1AfFVuHE4f_aq6ekHv7YSQ@mail.gmail.com>
	<CAApHDvq00TXpvN0hGDczQ9hMcNGCKY7=GVoH_FpXg=0MwjfO5g@mail.gmail.com>
	<CA+TgmoZRwy8202vxbUPBeZd_Tx5NYVtmpvBnJnOzZS3b81cpkg@mail.gmail.com>
	<CAApHDvo8EFm5A5f2S5hKEqSETTymnbSbFe=P-EJ=-8sAGKfWnA@mail.gmail.com>
	<CA+TgmoYfiQYpT52FH+HWXmg6k8kGjrL6oq1g8Ca+kLAFwRyy=Q@mail.gmail.com>
	<CAApHDvriW5ra-ACRoesr5U4Xq5uoQ7RMPupLpLZ9aD+Cjp-KVg@mail.gmail.com>
	<CA+TgmoYTWfSw8hOfvk1MfoHOBJYeRQaC0KrrX6_GhbJxfXwDRQ@mail.gmail.com>
	<3985903.1722617472@sss.pgh.pa.us>
	<CA+TgmoacM-Lxqa5Y9kvTmUUjeuWAoFxYgn3Gj+NP6soRdcm-uw@mail.gmail.com>
	<CA+TgmoYhGYHGw+TKSJc=VjmMF897nG8X8kydoX7TaPOJhcB8PA@mail.gmail.com>

On Wed, 2024-08-21 at 10:29 -0400, Robert Haas wrote:
> I went ahead and committed these patches. I know there's some debate
> over whether we want to show the # of disabled nodes and if so whether
> it should be controlled by COSTS, and I suspect I haven't completely
> allayed David's concerns about the initial_cost_XXX functions although
> I think that I did the right thing. But, I don't have the impression
> that anyone is desperately opposed to the basic concept, so I think it
> makes sense to put these into the tree and see what happens. We have
> quite a bit of time left in this release cycle to uncover bugs, hear
> from users or other developers, etc. about what problems there may be
> with this. If we end up deciding to reverse course or need to fix a
> bunch of stuff, so be it, but let's see what the feedback is.

I am somewhat unhappy about the "Disabled Nodes" in EXPLAIN.

First, the commit message confused me: it claims that the information
is displayed with EXPLAIN ANALYZE, but it's shown with every EXPLAIN.

But that's not important.  My complaints are:

1. The "disabled nodes" are always displayed.
   I'd be happier if it were only shown for COSTS ON, but I think it
   would be best if they were only shown with VERBOSE ON.

   After all, the messages are pretty verbose...

2. The "disabled nodes" are not only shown at the nodes where nodes
   were actually disabled, but also at every nodes above these nodes.

   This would be fine:

     Sort
       -> Nested Loop Join
            -> Hash Join
                 -> Index Scan
                    Disabled Nodes: 1
                 -> Hash
                      -> Index Scan
                         Disabled Nodes: 1
            -> Index Scan
               Disabled Nodes: 1

   This is annoying:

     Sort
     Disabled Nodes: 3
       -> Nested Loop Join
          Disabled Nodes: 3
            -> Hash Join
               Disabled Nodes: 2
                 -> Index Scan
                    Disabled Nodes: 1
                 -> Hash
                      -> Index Scan
                         Disabled Nodes: 1
            -> Index Scan
               Disabled Nodes: 1

I have no idea how #2 could be implemented, but it would be nice to have.
Please, please, can we show the "disabled nodes" only with VERBOSE?

Yours,
Laurenz Albe





view thread (164+ messages)  latest in thread

Message-ID: <9e4ad616bebb103ec2084bf6f724cfc739e7fabb.camel@cybertec.at>
Permalink:  ../9e4ad616bebb103ec2084bf6f724cfc739e7fabb.camel@cybertec.at/
Also on:    postgresql.org/message-id/9e4ad616bebb103ec2084bf6f724cfc739e7fabb.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: laurenz.albe@cybertec.at, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, hlinnaka@iki.fi, pg@bowt.ie, pgsql-hackers@lists.postgresql.org
  Subject: Re: On disable_cost
  In-Reply-To: <9e4ad616bebb103ec2084bf6f724cfc739e7fabb.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox