pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Christian Dannemann <Christian@merus.co.uk>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: prepared statements
Date: Tue, 12 Dec 2006 16:40:45 +0000
Message-ID: <457EDB8D.4070605@enterprisedb.com> (raw)
In-Reply-To: <457EC5F5.9090402@merus.co.uk>
References: <457EC5F5.9090402@merus.co.uk>

Christian Dannemann wrote:
> Hello All,
> 
> We are currently experimenting with a postgresql cluster database 
> (pgcluster 1.5rc11).
> 
> The cluster replicates all prepared statements across all database 
> servers (which makes sense if they are for updates and inserts). It also 
> does this for normal select statements.
> 
> That means that when using prepared statements, there is absolutely NO 
> gain from using a db cluster. Everything is executed in every database. 
> And there is the additional overhead of replicating that across. So huge 
> investment in hardware, and a performance loss is the gain from that :-(

In the future, I'd suggest doing more testing before making huge 
investments in hardware...

> Our application is written in java and we use the jdbc postgresql driver.
> 
> Now it appears that this driver issues ANY statement as a prepared 
> statement. I've tried to switch this off but to no avail. This is a huge 
> nightmare and I don't quite understand why it is deemed necessary to 
> issue every simple select statement as a prepared statement.

As Kris said, you really should be blaming pgcluster, and you can set 
the protocolVersion parameter if you need to.

There's better alternatives to pgcluster, for example Sequoia 
(http://sequoia.continuent.org/), or Slony (http://slony.info/)

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (105+ messages)

Message-ID: <457EDB8D.4070605@enterprisedb.com>
Permalink:  ../457EDB8D.4070605@enterprisedb.com/
Also on:    postgresql.org/message-id/457EDB8D.4070605@enterprisedb.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: heikki@enterprisedb.com, Christian@merus.co.uk
  Subject: Re: prepared statements
  In-Reply-To: <457EDB8D.4070605@enterprisedb.com>
  References: <457EC5F5.9090402@merus.co.uk> <457EDB8D.4070605@enterprisedb.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