Re: On disable_cost

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: On disable_cost
Дата
Msg-id 20191101170406.w6ybnafyvpxv2ltg@development
обсуждение исходный текст
Ответ на Re: On disable_cost  (Jim Finnerty <jfinnert@amazon.com>)
Ответы Re: On disable_cost  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: pglz performance
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: 64 bit transaction id