From: Alan Stange <stange@rentec.com>
To: pgsql-jdbc@postgresql.org
Subject: setFetchSize question
Date: Fri, 25 Feb 2005 11:12:38 -0500
Message-ID: <421F4E76.508@rentec.com> (raw)
Hello all,
I just noticed something and I thought I'd ask:
When reading large chunks of data in the 7.4 JDBC client I would code
something like this:
conn.setAutoCommit(false);
st.setFetchDirection(ResultSet.FETCH_FORWARD);
st.setFetchSize(1000);
st.executeQuery("select * from foo");
which would result in queries to the postgresql server like this:
DECLARE JDBC_CURS_588 CURSOR FOR select * from foo; fetch forward 1000
from JDBC_CURS_588;
with subsequent fetch forward queries being executed as the full result
set is pulled in.
In the 8.0 driver I don't see this happening. I see only the "select *
from foo" query in the postgresql server log.
Is the query result still being sent in batch chunks of 1000 rows, but
using a different mechanism?
Thanks!
-- Alan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: stange@rentec.com
Subject: Re: setFetchSize question
In-Reply-To: <421F4E76.508@rentec.com>
References: <421F4E76.508@rentec.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox