Re: On disable_cost
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Alena Rybakina <a.rybakina@postgrespro.ru>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>,
Robert Haas <robertmhaas@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-10-02T22:44:49Z
Lists: pgsql-hackers
On Thu, 3 Oct 2024 at 08:41, Alena Rybakina <a.rybakina@postgrespro.ru> wrote: > I may have misunderstood your message, but disabled nodes number must propagate up the tree, otherwise it will be incorrect. I think there are two misunderstandings on this thread: 1) You're misunderstanding what Laurenz is complaining about. He's only concerned with the EXPLAIN output, not how disasbled_nodes works internally. 2) Laurenz is misunderstanding what "Disabled Nodes" means. It has nothing to do with other Paths which were considered and rejected. It might be better named as "Disabled Degree". It tracks how many plan nodes below and including this node are disabled. Because of #2, I think I now understand why Laurenz was interested in only showing this with VERBOSE. If it worked the way Laurenz thought, I'd probably agree with him. Overall, I think we need to do something here. There's no documentation about what Disabled Nodes means so we either need to make it easier to understand without documenting it or add something to the documents about it. If Laurenz, who has a huge amount of PostgreSQL experience didn't catch it, then what hope is there for the average user? David
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