Re: Getting rid of cheap-startup-cost paths earlier

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Getting rid of cheap-startup-cost paths earlier
Дата
Msg-id CA+Tgmob5dX+UCrRqVUnxsr=jWvQdQcopEhJ5sGRt8_Y7vB7nOg@mail.gmail.com
обсуждение исходный текст
Ответ на Getting rid of cheap-startup-cost paths earlier  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Getting rid of cheap-startup-cost paths earlier  (Bruce Momjian <bruce@momjian.us>)
Re: Getting rid of cheap-startup-cost paths earlier  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, May 22, 2012 at 1:50 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Currently, the planner keeps paths that appear to win on the grounds of
> either cheapest startup cost or cheapest total cost.  It suddenly struck
> me that in many simple cases (viz, those with no LIMIT, EXISTS, cursor
> fast-start preference, etc) we could know a-priori that cheapest startup
> cost is not going to be interesting, and hence immediately discard any
> path that doesn't win on total cost.
>
> This would require some additional logic to detect whether the case
> applies, as well as extra complexity in add_path.  So it's possible
> that it wouldn't be worthwhile overall.  Still, it seems like it might
> be a useful idea to investigate.
>
> Thoughts?

Yeah, I think we should investigate that.  Presumably you could easily
have a situation where one part of the tree is under a LIMIT or EXISTS
and therefore needs to preserve fast-start plans but the rest of the
(potentially large) tree isn't, so we need something fairly
fine-grained, I think.  Maybe we could add a flag to each RelOptInfo
indicating whether fast-start plans should be kept, or something like
that.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Florian Pflug
Дата:
Сообщение: Re: Changing the concept of a DATABASE
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Changing the concept of a DATABASE