pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Csaba Nagy <nagy@ecircle-ag.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Postgres JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: Prepared statements, parameters and logging
Date: Mon, 25 Jun 2007 13:13:39 +0200
Message-ID: <1182770018.13328.63.camel@coppola.muc.ecircle.de> (raw)
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>

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 <unnamed> 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 <unnamed> 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
> 




view thread (12+ messages)  latest in thread

Message-ID: <1182770018.13328.63.camel@coppola.muc.ecircle.de>
Permalink:  ../1182770018.13328.63.camel@coppola.muc.ecircle.de/
Also on:    postgresql.org/message-id/1182770018.13328.63.camel@coppola.muc.ecircle.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: nagy@ecircle-ag.com, pg@fastcrypt.com
  Subject: Re: Prepared statements, parameters and logging
  In-Reply-To: <1182770018.13328.63.camel@coppola.muc.ecircle.de>
  References: <1182768449.13328.60.camel@coppola.muc.ecircle.de> <6A182763-97EC-43C9-BD13-EE5375A83AC2@fastcrypt.com> <1182770018.13328.63.camel@coppola.muc.ecircle.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