Re: setUseServerPrepare(true) and executeQuery(String)

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: setUseServerPrepare(true) and executeQuery(String)
Дата
Msg-id 3DE9CB98.1000804@xythos.com
обсуждение исходный текст
Ответ на setUseServerPrepare(true) and executeQuery(String)  (Harald Krake <harald@krake.de>)
Ответы Re: setUseServerPrepare(true) and executeQuery(String)
Список pgsql-jdbc
Harald,

Why would you want to disable caching for standard jdbc statements
plans?  In my application these are the ones that get reused the most,
and therefore benefit most from caching the plan on the server.  If you
don't wan't to use a server side prepared and cached plan, then don't
enable it for your regular jdbc statement objects.

thanks,
--Barry

Harald Krake wrote:
> playing with the new server side prepared statements of 7.3 I discovered
> that _all_ statements will be prepared as server objects, not only
> the prepared ones. Depending on the application this might result in
> a permanently increasing number of server objects.
>
> In executeQuery(String), AbstractJdbc1Statement.java:141
> I would suggest the following modification:
>
>     boolean old_useServerPrepare = m_useServerPrepare;
>     m_useServerPrepare = false;     // turn off for non-prepared statements
>     java.sql.ResultSet rs = executeQuery();
>     m_useServerPrepare = old_useServerPrepare;
>     return rs;
>
> regards,
> Harald.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>




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

Предыдущее
От: "Felipe Schnack"
Дата:
Сообщение: setDefault()
Следующее
От: Harald Krake
Дата:
Сообщение: Re: setUseServerPrepare(true) and executeQuery(String)