Re: ResultSet implementation

Поиск
Список
Период
Сортировка
От Nic Ferrier
Тема Re: ResultSet implementation
Дата
Msg-id 87znkg2a96.fsf@pooh-sticks-bridge.tapsellferrier.co.uk
обсуждение исходный текст
Ответ на ResultSet implementation  ("Sean Devlin" <seandevlin37@hotmail.com>)
Список pgsql-jdbc
"Sean Devlin" <seandevlin37@hotmail.com> writes:

> Hello,
>
> I would like to know if PG's implementation of ResultSet caches all or only
> some of the rows returned from a query.  If the RS implementation does fetch
> blocks of data as it iterates, how many rows are retrieved at a time?.. or
> does this number fluctuate? etc.

Normally pg-jdbc fetches ALL the results from a query and caches
them. The reason it does that is because it's the best option most of
the time.

With the driver in CVS it is possible to alter that behaviour. Just
turn off auto-commit and set the fetch size to the number of rows you
want cached.

When you do that the driver switches to a cursor querying
mechanism.

This is not in the released driver yet. I think it's planned for 7.4
but one of the core JDBC hackers will be able to confirm that.


Nic

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Sean Devlin"
Дата:
Сообщение: ResultSet implementation
Следующее
От: Darin Ohashi
Дата:
Сообщение: Bug in ResultSet.moveToCurrentRow