Re: Why is JDBC so slow? - Mailing list pgsql-jdbc

From Joseph Shraibman
Subject Re: Why is JDBC so slow?
Date
Msg-id 3F551EEF.8050109@selectacast.net
Whole thread Raw
In response to Re: Why is JDBC so slow?  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
> This can obviously still be improved on, but I think some of the blame for
> slow execution can be pinned on your heap settings not being tuned for the
> object allocation the client does.
>
Interesting.  I wouldn't have though that expanding the heap was such a slow operation.

I wrote this test so I could compare JDBC and psql side by side.  My real application uses
a cursor and the memory doesn't get so big.

> Incidentally, your use of getFetchSize() to size the return array in
> getResults() seems buggy .. I believe the "correct" way is to do
> ResultSet.last() then ResultSet.getRow().

That's what I used to do, but it makes the code cleaner to use getFetchSize().  Seems to
work all the time for me.



pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Why is JDBC so slow?
Next
From: buki@gmx.net (Andreas Buer)
Date:
Subject: Writing Binary