Re: Prepared statements considered harmful

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Prepared statements considered harmful
Дата
Msg-id 3923.1157121049@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Prepared statements considered harmful  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Prepared statements considered harmful  ("Jeroen T. Vermeulen" <jtv@xs4all.nl>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> Interesting thought. It might be worth trying. But my big question: is
> all this testing and counting actually going to be faster than just
> replanning? Postgresql's planner is not that slow.
> ...
> The thing is that number of possible plans is going to be proportional
> to factorial(number of tables).

Yeah.  One of the reasons the planner is acceptably fast is that it is
aggressive about discarding candidate plans as soon as they are clearly
inferior to other plans.  Tracking multiple plans that might be optimal
under varying assumptions about the query parameters would make things
exponentially slower.
        regards, tom lane


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

Предыдущее
От: mark@mark.mielke.cc
Дата:
Сообщение: Re: Prepared statements considered harmful
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] DOC: catalog.sgml