pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Csaba Nagy <nagy@ecircle-ag.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: Postgres JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: Prepared statements, parameters and logging
Date: Tue, 26 Jun 2007 11:25:32 +0200
Message-ID: <1182849932.13328.107.camel@coppola.muc.ecircle.de> (raw)
In-Reply-To: <4680D822.20205@opencloud.com>
References: <1182768449.13328.60.camel@coppola.muc.ecircle.de>
	<6A182763-97EC-43C9-BD13-EE5375A83AC2@fastcrypt.com>
	<1182770018.13328.63.camel@coppola.muc.ecircle.de>
	<C8485EE8-2EA6-4C87-91CB-E5370A3BDC53@fastcrypt.com>
	<1182775348.13328.69.camel@coppola.muc.ecircle.de>
	<9537AA08-53BB-434E-9E62-F326AADED792@fastcrypt.com>
	<1182778475.13328.79.camel@coppola.muc.ecircle.de>
	<46803664.3060701@opencloud.com>
	<1182846145.13328.95.camel@coppola.muc.ecircle.de>
	<4680D822.20205@opencloud.com>

Oliver,

Now this was enlightening... now I finally understand the behavior I
see.

> If you set prepareThreshold=0 then an unnamed statement should always be 
> used (& therefore actual parameter values should be taken into account 
> when planning), with one exception: the setFetchSize() case I described 
> in my earlier email.

The setFetchSize must be the cause I see the unnamed statements (I have
it automatically added to all of our select statements). For a query
with limit on it (the case of my problem-query), the fetch size is not
very useful, I'll get rid of it...

> If you set logLevel=2 on the driver, you should be able to see the 
> differences in the protocol flow in more detail than the server logging 
> lets you see.

Thanks for the tip, I'll do that too next time... for the current
situation your explanation is more then enough.

Thanks,
Csaba.





view thread (12+ messages)

Message-ID: <1182849932.13328.107.camel@coppola.muc.ecircle.de>
Permalink:  ../1182849932.13328.107.camel@coppola.muc.ecircle.de/
Also on:    postgresql.org/message-id/1182849932.13328.107.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, oliver@opencloud.com, pg@fastcrypt.com
  Subject: Re: Prepared statements, parameters and logging
  In-Reply-To: <1182849932.13328.107.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> <C8485EE8-2EA6-4C87-91CB-E5370A3BDC53@fastcrypt.com> <1182775348.13328.69.camel@coppola.muc.ecircle.de> <9537AA08-53BB-434E-9E62-F326AADED792@fastcrypt.com> <1182778475.13328.79.camel@coppola.muc.ecircle.de> <46803664.3060701@opencloud.com> <1182846145.13328.95.camel@coppola.muc.ecircle.de> <4680D822.20205@opencloud.com> <1182849932.13328.107.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