Re: On disable_cost

Alena Rybakina <a.rybakina@postgrespro.ru>

From: Alena Rybakina <a.rybakina@postgrespro.ru>
To: David Rowley <dgrowleyml@gmail.com>
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-03T17:35:48Z
Lists: pgsql-hackers

Attachments

>> 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?
>
> I think you are right, most users will perceive this parameter as the 
> number of rejected paths, and not in any other way.
>
To be honest, I don't have much experience writing documentation, but I 
think we should add a little more information to doc/src/sgml/perform.sgml.

It contains a description about "explain queries", so the description of 
"Disabled nodes" is available there.

I prepared a patch that includes the information we can add.



-- 
Regards,
Alena Rybakina
Postgres Professional

Commits

  1. Doc: add detail about EXPLAIN's "Disabled" property

  2. Adjust EXPLAIN's output for disabled nodes

  3. Fix order of parameters in a cost_sort call

  4. Show number of disabled nodes in EXPLAIN ANALYZE output.

  5. Treat number of disabled nodes in a path as a separate cost metric.

  6. Remove grotty use of disable_cost for TID scan plans.