pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Upgrading jdbc
3+ messages / 2 participants
[nested] [flat]

* Upgrading jdbc
@ 2009-08-20 14:46 hw@solvedirect.com
  0 siblings, 0 replies; 3+ messages in thread

From: hw@solvedirect.com @ 2009-08-20 14:46 UTC (permalink / raw)
  To: pgsql-jdbc

Hello!

I'm trying to upgrade to the current jdbc.
I tried both jdbc3 and jdbc4.

Until now we've been using pg74.215.jdbc3.jar.
The code is using methods that need a ResultSet with a Type different than
TYPE_FORWARD_ONLY. In the 7.4-version this seems to be standard.

For the new one I need to do:
PreparedStatement stmnt = connection.prepareStatement(JDBCEscSeq.convertEscSeq(sqlStmnt, objs), java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.ResultSet.CONCUR_READ_ONLY);
for the code to function as before.

So far this works. Unfortunately the execution of some statements is
extremly slow.
I identified "org.postgresql.core.v3.QueryExecutorImpl.receiveFields()" as the
point where the time is spent.

I'm using JDK 1.6.

Are there any hints I'm missing, any settings I need to set?

Thanks for advise, H. Wurth



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Upgrading jdbc
@ 2009-11-30 09:52 hw@solvedirect.com
  2009-11-30 11:14 ` Re: Upgrading jdbc Guillaume Cottenceau <gc@mnc.ch>
  0 siblings, 1 reply; 3+ messages in thread

From: hw@solvedirect.com @ 2009-11-30 09:52 UTC (permalink / raw)
  To: pgsql-jdbc

Hello!

I'm trying to upgrade to the current jdbc.
I tried both jdbc3 and jdbc4.

Until now we've been using pg74.215.jdbc3.jar.
The code is using methods that need a ResultSet with a Type different than
TYPE_FORWARD_ONLY. In the 7.4-version this seems to be standard.

For the new one I need to do:
PreparedStatement stmnt = 
connection.prepareStatement(JDBCEscSeq.convertEscSeq(sqlStmnt, objs), 
java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, 
java.sql.ResultSet.CONCUR_READ_ONLY);
for the code to function as before.

So far this works. Unfortunately the execution of some statements is
extremly slow.
I identified "org.postgresql.core.v3.QueryExecutorImpl.receiveFields()" as the
point where the time is spent.

I'm using JDK 1.6.

Are there any hints I'm missing, any settings I need to set?

Thanks for advise, H. Wurth



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Upgrading jdbc
  2009-11-30 09:52 Upgrading jdbc hw@solvedirect.com
@ 2009-11-30 11:14 ` Guillaume Cottenceau <gc@mnc.ch>
  0 siblings, 0 replies; 3+ messages in thread

From: Guillaume Cottenceau @ 2009-11-30 11:14 UTC (permalink / raw)
  To: hw@solvedirect.com; +Cc: pgsql-jdbc

hw 'at' solvedirect.com writes:

> Hello!
>
> I'm trying to upgrade to the current jdbc.
> I tried both jdbc3 and jdbc4.
>
> Until now we've been using pg74.215.jdbc3.jar.
> The code is using methods that need a ResultSet with a Type different than
> TYPE_FORWARD_ONLY. In the 7.4-version this seems to be standard.
>
> For the new one I need to do:
> PreparedStatement stmnt = 
> connection.prepareStatement(JDBCEscSeq.convertEscSeq(sqlStmnt, objs), 
> java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, 
> java.sql.ResultSet.CONCUR_READ_ONLY);
> for the code to function as before.
>
> So far this works. Unfortunately the execution of some statements is
> extremly slow.

You may hit a problem with the protocol version 3 and prepared
statements with variable parameters.

http://archives.postgresql.org/pgsql-jdbc/2009-03/msg00027.php

-- 
Guillaume Cottenceau



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2009-11-30 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-08-20 14:46 Upgrading jdbc hw@solvedirect.com
2009-11-30 09:52 Upgrading jdbc hw@solvedirect.com
2009-11-30 11:14 ` Guillaume Cottenceau <gc@mnc.ch>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox