pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedJDBC driver build 215 slow when index contains column of type BIGINT
4+ messages / 2 participants
[nested] [flat]
* JDBC driver build 215 slow when index contains column of type BIGINT
@ 2005-03-09 09:26 Roland Walter <rwa@mosaic-ag.com>
2005-03-09 09:39 ` Re: JDBC driver build 215 slow when index contains column Roland Walter <rwa@mosaic-ag.com>
2005-03-09 13:15 ` Re: JDBC driver build 215 slow when index contains column Oliver Jowett <oliver@opencloud.com>
0 siblings, 2 replies; 4+ messages in thread
From: Roland Walter @ 2005-03-09 09:26 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: JDBC driver build 215 slow when index contains column
2005-03-09 09:26 JDBC driver build 215 slow when index contains column of type BIGINT Roland Walter <rwa@mosaic-ag.com>
@ 2005-03-09 09:39 ` Roland Walter <rwa@mosaic-ag.com>
1 sibling, 0 replies; 4+ messages in thread
From: Roland Walter @ 2005-03-09 09:39 UTC (permalink / raw)
To: pgsql-jdbc
Roland Walter schrieb:
...
>
> 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.
...
Forgot to mention that the table contains about 1.5 million rows.
--
Roland Walter
MOSAIC SOFTWARE AG
Telefon: 02225/882-411 Fax: 02225/882-201
http://www.mosaic-ag.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: JDBC driver build 215 slow when index contains column
2005-03-09 09:26 JDBC driver build 215 slow when index contains column of type BIGINT Roland Walter <rwa@mosaic-ag.com>
@ 2005-03-09 13:15 ` Oliver Jowett <oliver@opencloud.com>
2005-03-09 13:27 ` Re: JDBC driver build 215 slow when index contains column Roland Walter <rwa@mosaic-ag.com>
1 sibling, 1 reply; 4+ messages in thread
From: Oliver Jowett @ 2005-03-09 13:15 UTC (permalink / raw)
To: Roland Walter <rwa@mosaic-ag.com>; +Cc: pgsql-jdbc
Roland Walter wrote:
> I use PostgreSQL 7.4.6 and the JDBC-driver build 215. [...]
> Have I to do a typecast to ::bigint with build 215 in the PreparedStatement
> to get the same performance as with build 310?
Against a 7.4.x server, yes.
> That would be bad, as I
> had to
> form the PreparedStatement incompatible to other databases.
Why can't you use build 310? It's intended to work against 7.4.x servers
as well as 8.0.x.
-O
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: JDBC driver build 215 slow when index contains column
2005-03-09 09:26 JDBC driver build 215 slow when index contains column of type BIGINT Roland Walter <rwa@mosaic-ag.com>
2005-03-09 13:15 ` Re: JDBC driver build 215 slow when index contains column Oliver Jowett <oliver@opencloud.com>
@ 2005-03-09 13:27 ` Roland Walter <rwa@mosaic-ag.com>
0 siblings, 0 replies; 4+ messages in thread
From: Roland Walter @ 2005-03-09 13:27 UTC (permalink / raw)
To: Oliver Jowett <oliver@opencloud.com>; +Cc: pgsql-jdbc
Oliver Jowett schrieb:
> Roland Walter wrote:
>
>> I use PostgreSQL 7.4.6 and the JDBC-driver build 215. [...]
>
>
>> Have I to do a typecast to ::bigint with build 215 in the
>> PreparedStatement
>> to get the same performance as with build 310?
>
>
> Against a 7.4.x server, yes.
>
>> That would be bad, as I had to
>> form the PreparedStatement incompatible to other databases.
>
>
> Why can't you use build 310? It's intended to work against 7.4.x
> servers as well as 8.0.x.
>
Will use it now.
I wanted to avoid finding the places in the application where setString
is used for BIGINT values.
But im just doing that now.
--
Roland Walter
MOSAIC SOFTWARE AG
Telefon: 02225/882-411 Fax: 02225/882-201
http://www.mosaic-ag.com
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-03-09 13:27 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-09 09:26 JDBC driver build 215 slow when index contains column of type BIGINT Roland Walter <rwa@mosaic-ag.com>
2005-03-09 09:39 ` Re: JDBC driver build 215 slow when index contains column Roland Walter <rwa@mosaic-ag.com>
2005-03-09 13:15 ` Re: JDBC driver build 215 slow when index contains column Oliver Jowett <oliver@opencloud.com>
2005-03-09 13:27 ` Re: JDBC driver build 215 slow when index contains column Roland Walter <rwa@mosaic-ag.com>
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