X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EFECF563B4 for ; Fri, 25 Feb 2005 16:20:45 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 16014-04 for ; Fri, 25 Feb 2005 16:20:44 +0000 (GMT) Received: from candata.com (gateway.candata.com [204.225.91.106]) by svr1.postgresql.org (Postfix) with ESMTP id 52D565638A for ; Fri, 25 Feb 2005 16:20:43 +0000 (GMT) Received: from playpen.candata.com (playpen.candata.com [192.168.1.2]) by candata.com (8.12.9/8.12.9) with ESMTP id j1PGLAsi003024; Fri, 25 Feb 2005 11:21:10 -0500 Subject: Re: setFetchSize question From: Dave Smith To: Alan Stange Cc: pgsql-jdbc@postgresql.org In-Reply-To: <421F4E76.508@rentec.com> References: <421F4E76.508@rentec.com> Content-Type: text/plain Message-Id: <1109348470.14394.43.camel@playpen.candata.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 25 Feb 2005 11:21:10 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/200 X-Sequence-Number: 12380 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