X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 81C33D1B8E8 for ; Tue, 22 Jun 2004 20:09:01 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 42892-08 for ; Tue, 22 Jun 2004 23:08:59 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 760C4D1B7C1 for ; Tue, 22 Jun 2004 20:08:56 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5MN8u2p024111; Tue, 22 Jun 2004 19:08:56 -0400 (EDT) To: "Nigel J. Andrews" Cc: L J Bayuk , pgsql-interfaces@postgresql.org Subject: Re: Released updated Tcl interfaces: pgin.tcl-2.1.0, In-reply-to: References: Comments: In-reply-to "Nigel J. Andrews" message dated "Tue, 22 Jun 2004 23:39:01 +0100" Date: Tue, 22 Jun 2004 19:08:56 -0400 Message-ID: <24110.1087945736@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/56 X-Sequence-Number: 4984 "Nigel J. Andrews" writes: > However, since making some changes to my code I've not had time to do the > investigation so I just thought I'd ask if there's been any reports on the > relative speed of normal sql execution against prepared statements. You can lose if the prepared statements are parameterized in such a way that the planner can't see critical information. This has been hashed over many a time in the pgsql-performance archives (though mostly in the context of queries in plpgsql functions). Try EXPLAIN EXECUTE and see if you get a materially different plan than with the straight query. regards, tom lane