Re: ResultSet implementation

From: Nic Ferrier <nferrier(at)tapsellferrier(dot)co(dot)uk>
To: "Sean Devlin" <seandevlin37(at)hotmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: ResultSet implementation
Date: 2003-06-17 11:50:45
Message-ID: 87znkg2a96.fsf@pooh-sticks-bridge.tapsellferrier.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"Sean Devlin" <seandevlin37(at)hotmail(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Darin Ohashi 2003-06-17 21:12:28 Bug in ResultSet.moveToCurrentRow
Previous Message zhuj 2003-06-17 09:22:47 maxconnection