Re: Reusing cached prepared statement slow after 5 executions

Поиск
Список
Период
Сортировка
От Radoslaw Smogura
Тема Re: Reusing cached prepared statement slow after 5 executions
Дата
Msg-id 20110627140231.EB3FAB5DC0C@mail.postgresql.org
обсуждение исходный текст
Список pgsql-general
This behavior is in some way needed, as PreparedStatement is, commonly, used once, just to pass parameters without
escaping.

Regards,
Radek

-----Original Message-----
From: Rob Gansevles
Sent: 27 czerwca 2011 08:50
To: pgsql-general
Subject: Re: [GENERAL] Reusing cached prepared statement slow after 5 executions

I can confirm, when I call ps.setPrepareThreshold(1) the query is slow
immediately, so the plan must be different with the server prepared
statements.

Thanks,

Rob

On Sun, Jun 26, 2011 at 5:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> David Johnston <polobo@yahoo.com> writes:
>> This is likely the case where the first few "prepared statements" are
>> not truly prepared.  Once you hit five the cache kicks in and computes
>> a generic query plan to cache.
>
> Not so much that as that JDBC decides that it should tell the backend to
> start using a prepared plan.  See the JDBC docs.
>
>                        regards, tom lane
>

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: discard on constraint violation
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: discard on constraint violation