Re: Very strange performance decrease when reusing a PreparedStatement

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Very strange performance decrease when reusing a PreparedStatement
Дата
Msg-id 491f66a50905030310j5b4cdcd8jbf4f6e757c2ba580@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Very strange performance decrease when reusing a PreparedStatement  (Péter Kovács <maxottovonstirlitz@gmail.com>)
Ответы Re: Very strange performance decrease when reusing a PreparedStatement
Re: Very strange performance decrease when reusing a PreparedStatement
Список pgsql-jdbc

It appears that the Postgres "server-prepared statement" cannot handle
parameters to the statement. This is really unfortunate, because 99%
of real-life applications will want to re-use the same statement
(template) with different parameters.

The term "server-prepared statement" itself already indicates that
there may be something skewed about the "local" semantics of
java.sql.PreparedStatements in the Postgres JDBC driver. There is no
notion of "client-prepared statement" in the JDBC API, which conceives
PreparedStatement instances as mere handles to server side objects.
And indeed, Postgres JDBC users have historically been using
java.sql.PreparedStatements for its side-effect of preventing SQL
injection rather than for the purpose the JDBC API designers had in
mind with this class.

I'm not sure where this hypothesis is coming from. Postgresql server prepared statements can certainly handle parameters.

What makes you think it can't ?

Dave

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

Предыдущее
От: Péter Kovács
Дата:
Сообщение: Re: Very strange performance decrease when reusing a PreparedStatement
Следующее
От: John Lister
Дата:
Сообщение: Re: Very strange performance decrease when reusing a PreparedStatement