pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ken Johanson <pg-user@kensystem.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Synthesize support for Statement.getGeneratedKeys()?
Date: Sun, 28 Jan 2007 08:51:17 -0700
Message-ID: <45BCC675.5050000@kensystem.com> (raw)
In-Reply-To: <Pine.BSO.4.64.0701262349230.20148@leary2.csoft.net>
References: <4580E681.3080106@kensystem.com>
	<45B986CB.70100@kensystem.com>
	<Pine.BSO.4.64.0701262349230.20148@leary2.csoft.net>

>> In implementing Statement.executeUpdate(String sql,String[] 
>> columnNames), does any know how I could go about sending the sql and 
>> subsequent RETURNING clause directly to a stream? Just so I can avoid 
>> double-buffering the query (allocated in the sql, and second in the 
>> StringBuffer I'd be appending the RETURNING clause to).
> 
> Don't worry about this minor overhead.  So much other manipulation and 
> object creation happens (even forgetting the network trip) that this 
> will be in the noise.
> 


Hmm, this might be an area I'd enjoy contributing code for.. if there 
are places now where there is avoidable double or triple allocation 
(like in my patch) (where it could instead be handled by streams and/or 
finer grained chunks), and since the driver (apparently) already has 
some stream based utils... maybe I could try to improve those.

I know from experience with other tools that unnec allocation can play 
havoc under high load and/or very large data sets, using (resizeable) 
buffers (like StringBuffer). When that code gets optimized the 
application becomes much more responsive.

If you know of any places in the driver that could benefit from this, 
please let me know.

ken





view thread (50+ messages)  latest in thread

Message-ID: <45BCC675.5050000@kensystem.com>
Permalink:  ../45BCC675.5050000@kensystem.com/
Also on:    postgresql.org/message-id/45BCC675.5050000@kensystem.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: pg-user@kensystem.com, books@ejurka.com
  Subject: Re: Synthesize support for Statement.getGeneratedKeys()?
  In-Reply-To: <45BCC675.5050000@kensystem.com>
  References: <4580E681.3080106@kensystem.com> <45B986CB.70100@kensystem.com> <Pine.BSO.4.64.0701262349230.20148@leary2.csoft.net> <45BCC675.5050000@kensystem.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