Re: Performance problem iterating a resultset - Mailing list pgsql-jdbc

From Teofilis Martisius
Subject Re: Performance problem iterating a resultset
Date
Msg-id 20021018191840.GA3650@teohome.lzua.lt
Whole thread Raw
In response to Performance problem iterating a resultset  (Riyaz@umapinc.com)
List pgsql-jdbc
Hi,

While testing PostgreSQL JDBC I have noticed that it uses byte[]->String
conversion everywhere via 'new String(byte[], encoding)' constructor. I
found the implementation of that constructor painfully slow at least in
Sun's JDK 1.3.1 and 1.4.0, a bit better in gcj 3.2.  I have made a patch
that uses my own UTF-8 Unicode byte[]->String constructor and it speeds
up iterating a resultset ~1.5-2x on Sun's JDK.

Please confirm if anyone has similar experience. I will post the patch
to this mailing list if you are interested in it. Too bad it only works
with Unicode databases, and uses the default String constructor for other
character codings.

Teofilis Martisius,
teo@teohome.lzua.lt

pgsql-jdbc by date:

Previous
From: Nic Ferrier
Date:
Subject: Re: Getting a ResultSet for a refcursor element.
Next
From: Barry Lind
Date:
Subject: Re: problem with the build file?