Re: On disable_cost
Tomas Vondra <tomas.vondra@2ndquadrant.com>
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Jim Finnerty <jfinnert@amazon.com>
Cc: pgsql-hackers@postgresql.org
Date: 2019-11-01T17:04:06Z
Lists: pgsql-hackers
On Fri, Nov 01, 2019 at 09:30:52AM -0700, Jim Finnerty wrote: >re: coping with adding disable_cost more than once > >Another option would be to have a 2-part Cost structure. If disable_cost is >ever added to the Cost, then you set a flag recording this. If any plans >exist that have no disable_costs added to them, then the planner chooses the >minimum cost among those, otherwise you choose the minimum cost path. > Yeah, I agree having is_disabled flag, and treat all paths with 'true' as more expensive than paths with 'false' (and when both paths have the same value then actually compare the cost) is probably the way forward. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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