Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B8D069F9357 for ; Tue, 12 Dec 2006 11:15:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 96270-04 for ; Tue, 12 Dec 2006 11:15:36 -0400 (AST) X-Greylist: delayed 00:06:25.201169 by SQLgrey-1.7.4 Received: from p15179701.pureserver.info (p15179701.pureserver.info [82.165.38.237]) by postgresql.org (Postfix) with ESMTP id 59DCF9FA0EE for ; Tue, 12 Dec 2006 11:15:35 -0400 (AST) Received: (qmail 25109 invoked from network); 12 Dec 2006 15:13:16 +0000 Received: from host-84-9-70-246.bulldogdsl.com (HELO ?192.168.2.12?) (84.9.70.246) by p15179701.pureserver.info with SMTP; 12 Dec 2006 15:13:16 +0000 Message-ID: <457EC5F5.9090402@merus.co.uk> Date: Tue, 12 Dec 2006 15:08:37 +0000 From: Christian Dannemann Organization: Merus Software Ltd User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: prepared statements Content-Type: multipart/alternative; boundary="------------080101030201060203080607" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.376 tagged_above=0 required=5 tests=BAYES_50, HTML_30_40, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200612/56 X-Sequence-Number: 16288 This is a multi-part message in MIME format. --------------080101030201060203080607 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 :-( 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. Maybe someone on this mailing list can enlighten me? Kind Regards, Christian -- Christian Dannemann Managing Director Merus Software Ltd Phone: +44 (0)1453 708 600 DDI: +44 (0)1453 708 610 VoIP: christian@sip.merus.co.uk http://www.merus.co.uk --------------080101030201060203080607 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 :-(

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.

Maybe someone on this mailing list can enlighten me?

Kind Regards,

Christian
-- 
Christian Dannemann
Managing Director
Merus Software Ltd
Phone: +44 (0)1453 708 600
DDI: +44 (0)1453 708 610
VoIP: christian@sip.merus.co.uk
http://www.merus.co.uk
--------------080101030201060203080607--