JDBC driver build 215 slow when index contains column of type BIGINT - Mailing list pgsql-jdbc

From Roland Walter
Subject JDBC driver build 215 slow when index contains column of type BIGINT
Date
Msg-id 422EC149.5040306@mosaic-ag.com
Whole thread Raw
Responses Re: JDBC driver build 215 slow when index contains column  (Roland Walter <rwa@mosaic-ag.com>)
Re: JDBC driver build 215 slow when index contains column  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
Hello!

I use PostgreSQL 7.4.6 and the JDBC-driver build 215. I have
a table of the form

create table business_case (
  bc_id BIGINT PRIMARY KEY,
  ...
);

To update a row, I use a PreparedStatement of the form

update business_case set ... where bc_id=?

I use setLong() to set the value of bc_id, but the update
is slow, as the index on bigint does not get used.

Changing the JDBC-driver to build 310 increases the speed dramatically:
160 updates with build 215 consumed more than 10 minutes, with build 310
just about 3 seconds.

Have I to do a typecast to ::bigint with build 215 in the PreparedStatement
to get the same performance as with build 310? That would be bad, as I
had to
form the PreparedStatement incompatible to other databases.

Regards,
Roland.

--
Roland Walter
MOSAIC SOFTWARE AG
Telefon: 02225/882-411 Fax: 02225/882-201
http://www.mosaic-ag.com


pgsql-jdbc by date:

Previous
From: Antony Paul
Date:
Subject: Re: FW: PreparedStatement#setString on non-string parameters
Next
From: Roland Walter
Date:
Subject: Re: JDBC driver build 215 slow when index contains column