Re: On disable_cost

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Rowley <dgrowleyml(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: On disable_cost
Date: 2024-10-02 18:12:40
Message-ID: cc32f2a205ea3bc4993958b949c055ef28496829.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2024-10-02 at 10:08 -0400, Robert Haas wrote:
> On Fri, Sep 27, 2024 at 4:42 AM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
> > 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...
>
> I agree that the messages are more verbose than what we did before
> (add a large value to the cost). But I would have thought it wouldn't
> matter much because most of the time nothing will be disabled. And I
> would think if you get a plan that has some nodes disabled, you would
> want to know about that.

I'm alright with that, but I certainly don't want to see them propagated
through the tree. If you have a three page execution plan, and now it
is four pages long because some sequential scan at the lower end was
disabled and I get "Disabled nodes: 1" on every third line, that is
going to make me unhappy.

> I actually thought it was rather nice that this system lets you show
> the disabled-nodes information even when COSTS OFF. Regression tests
> need to suppress costs because it can vary by platform, but the count
> of disabled nodes is stable enough to display.

VERBOSE can be used with COSTS OFF, so that would work nicely if the
disabled nodes were only shown with EXPLAIN (VERBOSE).

I don't think that the feature is bad, I just would prefer it disabled
by default.

Yours,
Laurenz Albe

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alena Rybakina 2024-10-02 18:13:03 Re: On disable_cost
Previous Message Laurenz Albe 2024-10-02 18:04:08 Re: On disable_cost