Re: PREPARE and stuff

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: PREPARE and stuff
Дата
Msg-id 467D95C4.4020407@enterprisedb.com
обсуждение исходный текст
Ответ на PREPARE and stuff  (PFC <lists@peufeu.com>)
Список pgsql-performance
PFC wrote:
>
>     Suppose a web application with persistent database connections.
>     I have some queries which take longer to plan than to execute !
>
>     I with there was a way to issue a PREPARE (like "PERSISTENT PREPARE").
>     Now all Postgres connections would know that prepared statement foo(
> $1, $2, $3 ) corresponds to some SQL query, but it wouldn't plan it yet.
> Just like a SQL function.
>     When invoking EXECUTE foo( 1,2,3 ) on any given connection the
> statement would get prepared and planned. Then on subsequent invocations
> I'd just get the previously prepared plan.

How would that be different from the current PREPARE/EXECUTE? Do you
mean you could PREPARE in one connection, and EXECUTE in another? If
you're using persistent connections, it wouldn't be any faster than
doing a PREPARE once in each connection.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

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

Предыдущее
От: PFC
Дата:
Сообщение: PREPARE and stuff
Следующее
От: "Andreas Kostyrka"
Дата:
Сообщение: Re: PREPARE and stuff