pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Csaba Nagy <nagy@ecircle-ag.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 10:07:44 +1200
Message-ID: <46803CB0.2000009@opencloud.com> (raw)
In-Reply-To: <1182778475.13328.79.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>

Csaba Nagy wrote:

(before:)

> duration: 5437.499 ms  statement: EXECUTE <unnamed>  [PREPARE:  SELECT
> ... ]

(after:)

> duration: 2200.570 ms  statement: EXECUTE C_220047  [PREPARE:  SELECT
> ... ]

Also.. as to why you see the behaviour change, I'd guess that you're 
using log_min_duration and the plans for the queries where you are using 
setFetchSize() have changed from one with low startup cost to one with 
high startup cost due to switching from named to unnamed statements. The 
high startup cost plan means the very first portal execution takes 
longer and gets logged.. the low startup cost plan might be more 
expensive overall but the cost is spread out across all the portal 
executions, so no one execution takes long enough to get logged.

-O



view thread (12+ messages)  latest in thread

Message-ID: <46803CB0.2000009@opencloud.com>
Permalink:  ../46803CB0.2000009@opencloud.com/
Also on:    postgresql.org/message-id/46803CB0.2000009@opencloud.com

 · 

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: oliver@opencloud.com, nagy@ecircle-ag.com, pg@fastcrypt.com
  Subject: Re: Prepared statements, parameters and logging
  In-Reply-To: <46803CB0.2000009@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> <46803CB0.2000009@opencloud.com>

* 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