pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Logan Bowers <logan@zillow.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Non-blocking SQL Execution
Date: Mon, 31 Oct 2005 19:49:42 -0500
Message-ID: <C0FA2AAC-0091-43DF-92AA-1AD5FF9105BD@fastcrypt.com> (raw)
In-Reply-To: <85CE4E3FD2EC2C4E8AAE39916AC1A383090BA842@ms07.mse2.exchange.ms>
References: <85CE4E3FD2EC2C4E8AAE39916AC1A383090BA842@ms07.mse2.exchange.ms>

It's probably easier to create a non-blocking thread which  
encapsulates the driver

And yes, the postgres driver blocks on the execute.

Dave
On 31-Oct-05, at 7:06 PM, Logan Bowers wrote:

> Hello,
>
>
>
> (sorry if this comes through twice)
>
>
>
> I'm running a web application that needs to run several queries  
> against several databases
>
> to satisfy a single request.  To minimize latency I'd like to be  
> able to issue
>
> "<PreparedStatement Object>.executeQuery()" on each connection,  
> allow the servers to
>
> execute the queries in parallel, and then only block when I attempt  
> to fetch the first
>
> row.
>
>
>
> My anecdotal experience with JDBC drivers in general are that they  
> block when you attempt
>
> to execute the query, not when you attempt to retrieve data.  Is  
> this the case for the
>
> Postgres driver?  Does anyone have a feel for how hard it would be  
> to modify the driver
>
> allow queries to be executed in the background?  Thanks!
>
>
>
> Logan Bowers
>
>
>
>

view thread (4+ messages)  latest in thread

Message-ID: <C0FA2AAC-0091-43DF-92AA-1AD5FF9105BD@fastcrypt.com>
Permalink:  ../C0FA2AAC-0091-43DF-92AA-1AD5FF9105BD@fastcrypt.com/
Also on:    postgresql.org/message-id/C0FA2AAC-0091-43DF-92AA-1AD5FF9105BD@fastcrypt.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@fastcrypt.com, logan@zillow.com
  Subject: Re: Non-blocking SQL Execution
  In-Reply-To: <C0FA2AAC-0091-43DF-92AA-1AD5FF9105BD@fastcrypt.com>
  References: <85CE4E3FD2EC2C4E8AAE39916AC1A383090BA842@ms07.mse2.exchange.ms> <C0FA2AAC-0091-43DF-92AA-1AD5FF9105BD@fastcrypt.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