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 E277B52A47 for ; Tue, 19 Jul 2005 20:12:25 -0300 (ADT) 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 93300-02 for ; Tue, 19 Jul 2005 23:12:21 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 64DD052A22 for ; Tue, 19 Jul 2005 20:12:21 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Dv1GC-0000ep-Bw; Wed, 20 Jul 2005 11:12:24 +1200 Message-ID: <42DD88D7.4090605@opencloud.com> Date: Wed, 20 Jul 2005 11:12:23 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Grittner Cc: pgsql-jdbc@postgresql.org Subject: Re: Streaming ResultSet References: In-Reply-To: X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/150 X-Sequence-Number: 13298 Kevin Grittner wrote: > (3) There is overhead to creating a cursor for a select statement. > Granted, in my tests it was only about 20 microseconds, but that boosted > runtime for my simple test case by 3%. This seems a bit high; what's your query and which driver version are you using? The current drivers just name the result portal at the protocol level (which is essentially a FETCH_FORWARD_ONLY cursor, but not in so many words) and ask for N rows at a time; otherwise, all the processing should be the same. I'm suprised that the act of naming the portal and splitting the output into batches adds as much as 20ms to query execution time.. -O