Re: Prepared statements considered harmful

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Prepared statements considered harmful
Дата
Msg-id 20060901074829.GF12644@svana.org
обсуждение исходный текст
Ответ на Re: Prepared statements considered harmful  (Lukas Kahwe Smith <smith@pooteeweet.org>)
Список pgsql-hackers
On Fri, Sep 01, 2006 at 09:26:24AM +0200, Lukas Kahwe Smith wrote:
> AFAIK since Oracle 9i planning is always deferred until the first
> execution. This way they hope to get a better plan, which would
> obviously not be possible if the selectivity varies greatly.

Interesting.

> So are the plans generated without taking any bound values into account
> more stable in performance (albeit at times slower than what would have
> been produced if the value would have been known)?

Possibly, though they might uniformly suck or be uniformly good...

> Either way mixing the question of when to prepare the plan with the
> prepared statement being named or unnamed seems unexpected.

Yes, well, when the V3 protocol designed it wasn't considered to
seperate the parse and plan phases. The exact commit that got us to
where we are now is here:

http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c#rev1.420

That was over two years ago, I'm not sure whether any of the ideas
mentioned in there have been implemented since.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: "Zeugswetter Andreas DCP SD"
Дата:
Сообщение: Re: Prepared statements considered harmful
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Win32 hard crash problem