pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: till toenges <tt@kyon.de>
To: Dave Cramer <pg@fastcrypt.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: statement caching proof of concept
Date: Tue, 20 Jun 2006 01:56:55 +0200
Message-ID: <449739C7.2070303@kyon.de> (raw)
In-Reply-To: <D6688629-8E73-4BA2-9FB7-EEE2761E16F9@fastcrypt.com>
References: <4077BF73-482B-46C8-B65D-2E1FD2465294@fastcrypt.com>
	<4496F396.8030408@kyon.de>
	<5A43640B-3C41-4D07-AA9E-588AD8AAD343@fastcrypt.com>
	<44972AF1.1020009@kyon.de>
	<D6688629-8E73-4BA2-9FB7-EEE2761E16F9@fastcrypt.com>

Dave Cramer wrote:
> AFAIK Postgres doesn't allow concurrent statements on the same  
> connection, so I don't see how using multiple threads would work ?

The statements wouldn't need to be concurrent in the sense of happening
at the same time:

// stupid query
String sql = "SELECT * FROM quicklychangingtable";
PreparedStatement p1 = connection.prepareStatement(sql);
PreparedStatement p2 = connection.prepareStatement(sql);
ResultSet r1 = p1.executeQuery();
// do something else for a while
ResultSet r2 = p2.executeQuery();

What happens with r1? Might be ok, but i'm not sure if this is always true.


Till



view thread (18+ messages)  latest in thread

Message-ID: <449739C7.2070303@kyon.de>
Permalink:  ../449739C7.2070303@kyon.de/
Also on:    postgresql.org/message-id/449739C7.2070303@kyon.de

 · 

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: tt@kyon.de, pg@fastcrypt.com
  Subject: Re: statement caching proof of concept
  In-Reply-To: <449739C7.2070303@kyon.de>
  References: <4077BF73-482B-46C8-B65D-2E1FD2465294@fastcrypt.com> <4496F396.8030408@kyon.de> <5A43640B-3C41-4D07-AA9E-588AD8AAD343@fastcrypt.com> <44972AF1.1020009@kyon.de> <D6688629-8E73-4BA2-9FB7-EEE2761E16F9@fastcrypt.com> <449739C7.2070303@kyon.de>

* 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