Re: Connection.setBytes()
От | Joachim Achtzehnter |
---|---|
Тема | Re: Connection.setBytes() |
Дата | |
Msg-id | Pine.WNT.4.21.0007181248340.131-100000@van4 обсуждение исходный текст |
Ответ на | Re: Connection.setBytes() (ChristophSchmidt <cs.hilzingen@swol.de>) |
Список | pgsql-interfaces |
On Tue, 18 Jul 2000, Christoph Schmidt wrote: > > where is the point to turn autocommit off ? You turn it off by calling a method on Connection. > I am new to PREPARED STATEMENT... > Where can i find the documentation ? See the JDBC documentation on Sun's Web site, or any recent Java book. > How much more efficient is it ? Unfortunately, with Postgresql PreparedStatement is not more efficient because Postgresql does not cache queries on the server. The Postgresql JDBC driver must expand the '?' placeholders on the client-side and send the complete query to the backend. Even without the performance advantage, PreparedStatement can be more convenient because it adds some value. For example, when a '?' is replaced by a string using setString() the driver will escape any single quotes that may be contained in the string. If you construct the query yourself it is your responsibility to get this right. Joachim
В списке pgsql-interfaces по дате отправления: