Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id EDED49FB2A3 for ; Mon, 25 Jun 2007 08:13:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 10600-10 for ; Mon, 25 Jun 2007 08:13:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail3.ecircle.de (mail3.ecircle.de [195.140.186.206]) by postgresql.org (Postfix) with ESMTP id 251DF9FA649 for ; Mon, 25 Jun 2007 08:13:41 -0300 (ADT) Received: from einstein.muc.ecircle.de (einstein.muc.ecircle.de [192.168.1.7]) by mail3.ecircle.de (READY) with ESMTP id 620DD11C06C; Mon, 25 Jun 2007 13:13:39 +0200 (CEST) Received: from [192.168.1.91] ([192.168.1.91]) by einstein.muc.ecircle.de with Microsoft SMTPSVC(6.0.3790.1830); Mon, 25 Jun 2007 13:13:39 +0200 Subject: Re: Prepared statements, parameters and logging From: Csaba Nagy To: Dave Cramer Cc: Postgres JDBC In-Reply-To: <6A182763-97EC-43C9-BD13-EE5375A83AC2@fastcrypt.com> References: <1182768449.13328.60.camel@coppola.muc.ecircle.de> <6A182763-97EC-43C9-BD13-EE5375A83AC2@fastcrypt.com> Content-Type: text/plain Message-Id: <1182770018.13328.63.camel@coppola.muc.ecircle.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 25 Jun 2007 13:13:39 +0200 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 Jun 2007 11:13:39.0146 (UTC) FILETIME=[E1AA7AA0:01C7B719] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/92 X-Sequence-Number: 17154 Actually what I'm interested in is to give the server the parameter values for planning or not... before I wanted generic queries so I didn't want the server to see the parameters, and now I want the server to see them before creating the execution plan... am I turning the right knob for this ? Thanks, Csaba. On Mon, 2007-06-25 at 12:54, Dave Cramer wrote: > Csaba, > > They will all be prepared. The threshold is whether to re-use the > prepared statement. > > What you are seeing is the use of unnamed statements. > > If you really want them turned off use protocolVersion=2 > > Dave > On 25-Jun-07, at 6:47 AM, Csaba Nagy wrote: > > > Hi all, > > > > I have a system (postgres 8.1) which was until now running with JDBC > > parameter prepareThreshold=1 so it is always using server side > > prepares > > (we had some trouble in the past if not setting it so). Now we are > > prepared to set this to 0, meaning no server side prepares by > > default... > > > > The problem is that I did the switch and I still see queries which are > > presumably server side prepared (marked with in the log - I > > enabled reporting queries longer than 2 seconds)... > > > > The question is how do I tell for sure from the DB log if a query is > > server side prepared or not ? I was presuming that in the > > log > > means server side prepare, some name like 'C_xyz' means client side > > prepared statement. Is this correct ? > > > > Thanks, > > Csaba. > > > > > > > > ---------------------------(end of > > broadcast)--------------------------- > > TIP 3: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/docs/faq >