Re: Why is JDBC so slow?

Поиск
Список
Период
Сортировка
От Joseph Shraibman
Тема Re: Why is JDBC so slow?
Дата
Msg-id 3F551EEF.8050109@selectacast.net
обсуждение исходный текст
Ответ на Re: Why is JDBC so slow?  (Oliver Jowett <oliver@opencloud.com>)
Список 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 по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Why is JDBC so slow?
Следующее
От: buki@gmx.net (Andreas Buer)
Дата:
Сообщение: Writing Binary