Re: On disable_cost
Jelte Fennema-Nio <postgres@jeltef.nl>
From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Robert Haas <robertmhaas@gmail.com>
Cc: David Rowley <dgrowleyml@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Heikki Linnakangas <hlinnaka@iki.fi>, Peter Geoghegan <pg@bowt.ie>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-08-22T12:07:32Z
Lists: pgsql-hackers
On Wed, 31 Jul 2024 at 18:23, Robert Haas <robertmhaas@gmail.com> wrote: > - If we do commit 0002, I think it's a good idea to have the number of > disabled nodes displayed even with COSTS OFF, because it's stable, and > it's pretty useful to be able to see this in the regression output. I > have found while working on this that I often need to adjust the .sql > files to say EXPLAIN (COSTS ON) instead of EXPLAIN (COSTS OFF) in > order to understand what's happening. Right now, there's no real > alternative because costs aren't stable, but disabled-node counts > should be stable, so I feel this would be a step forward. Apart from > that, I also think it's good for features to have regression test > coverage, and since we use COSTS OFF everywhere or at least nearly > everywhere in the regression test, if we don't print out the disabled > node counts when COSTS OFF is used, then we don't cover that case in > our tests. Bummer. Are the disabled node counts still expected to be stable even with GEQO? If not, maybe we should have a way to turn them off after all. Although I agree that always disabling them when COSTS OFF is set is probably also undesirable. How about a new option, e.g. EXPLAIN (DISABLED OFF)
Commits
-
Doc: add detail about EXPLAIN's "Disabled" property
- 84b8fccbe5c2 18.0 landed
-
Adjust EXPLAIN's output for disabled nodes
- 161320b4b960 18.0 landed
-
Fix order of parameters in a cost_sort call
- 87b6c3c0b703 18.0 landed
-
Show number of disabled nodes in EXPLAIN ANALYZE output.
- c01743aa4866 18.0 landed
-
Treat number of disabled nodes in a path as a separate cost metric.
- e22253467942 18.0 landed
-
Remove grotty use of disable_cost for TID scan plans.
- e4326fbc60c4 18.0 landed