Re: Non-blocking SQL Execution - Mailing list pgsql-jdbc

From Logan Bowers
Subject Re: Non-blocking SQL Execution
Date
Msg-id 85CE4E3FD2EC2C4E8AAE39916AC1A383090BA92A@ms07.mse2.exchange.ms
Whole thread Raw
In response to Non-blocking SQL Execution  ("Logan Bowers" <logan@zillow.com>)
Responses Re: Non-blocking SQL Execution
List pgsql-jdbc

Ah yes, I like this strategy, it will actually make things easier in my application for dealing with timeouts and such (since they can be handled in the thread).  Thanks! 

 

Logan Bowers

 


From: Dave Cramer [mailto:pg@fastcrypt.com]
Sent: Monday, October 31, 2005 4:50 PM
To: Logan Bowers
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] Non-blocking SQL Execution

 

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

 



 

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Non-blocking SQL Execution
Next
From: Euler Taveira de Oliveira
Date:
Subject: Re: translation update: pt_BR