pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Smith <dave.smith@candata.com>
To: Alan Stange <stange@rentec.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: setFetchSize question
Date: Fri, 25 Feb 2005 11:21:10 -0500
Message-ID: <1109348470.14394.43.camel@playpen.candata.com> (raw)
In-Reply-To: <421F4E76.508@rentec.com>
References: <421F4E76.508@rentec.com>

Funny, I'm trying to do the same thing. I think the problem is that V3
protocol (bind/execute) , Postgresql does not log the portal command
just the SQL statement. I'm busy trying to find the link in the archives
to this problem ..

On Fri, 2005-02-25 at 11:12, Alan Stange wrote:
> 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
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
>                http://archives.postgresql.org
-- 
Dave Smith
CANdata Systems Ltd
416-493-9020




view thread (4+ messages)  latest in thread

Message-ID: <1109348470.14394.43.camel@playpen.candata.com>
Permalink:  ../1109348470.14394.43.camel@playpen.candata.com/
Also on:    postgresql.org/message-id/1109348470.14394.43.camel@playpen.candata.com

 · 

reply

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: dave.smith@candata.com, stange@rentec.com
  Subject: Re: setFetchSize question
  In-Reply-To: <1109348470.14394.43.camel@playpen.candata.com>
  References: <421F4E76.508@rentec.com> <1109348470.14394.43.camel@playpen.candata.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