pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Streaming ResultSet
Date: Wed, 20 Jul 2005 11:12:23 +1200
Message-ID: <42DD88D7.4090605@opencloud.com> (raw)
In-Reply-To: <s2dd1ab9.027@gwmta.wicourts.gov>
References: <s2dd1ab9.027@gwmta.wicourts.gov>

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



view thread (11+ messages)  latest in thread

Message-ID: <42DD88D7.4090605@opencloud.com>
Permalink:  ../42DD88D7.4090605@opencloud.com/
Also on:    postgresql.org/message-id/42DD88D7.4090605@opencloud.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: oliver@opencloud.com, Kevin.Grittner@wicourts.gov
  Subject: Re: Streaming ResultSet
  In-Reply-To: <42DD88D7.4090605@opencloud.com>
  References: <s2dd1ab9.027@gwmta.wicourts.gov> <42DD88D7.4090605@opencloud.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