Re: Prepared statement already exists

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Prepared statement already exists
Дата
Msg-id 20081120141828.GN2459@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Re: Prepared statement already exists  (WireSpot <wirespot@gmail.com>)
Список pgsql-general
On Thu, Nov 20, 2008 at 04:03:08PM +0200, WireSpot wrote:
> On Thu, Nov 20, 2008 at 15:45, Sam Mason <sam@samason.me.uk> wrote:
> > Have you thought about using stored procedures instead of prepared
> > statements?  No need to register them or keep track of that state.
>
> I'm not sure if it would work. What I'm trying to do is have an
> application layer which takes all the client queries and makes
> prepared statements out of them.

I think it depends on what level this abstraction wants to live.  If
its purpose is just to make queries run a bit quicker then, no, stored
procedures aren't going to help at all.  If this abstraction can be
given knowledge of the things that you actually want to do against the
database then stored procedures could be a win.

The best structure will be determined by your problem, I just thought
that mentioning another solution may push your mental model around a bit
to help clarify the "best" solution.


  Sam

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

Предыдущее
От: "Sabin Coanda"
Дата:
Сообщение: on error logs the whole multiline script
Следующее
От: WireSpot
Дата:
Сообщение: Re: Prepared statement already exists