Re: Prepared statements, parameters and logging - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Prepared statements, parameters and logging
Date
Msg-id 46803CB0.2000009@opencloud.com
Whole thread Raw
In response to Re: Prepared statements, parameters and logging  (Csaba Nagy <nagy@ecircle-ag.com>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Prepared statements, parameters and logging
Next
From: "Bady, Brant RBCM:EX"
Date:
Subject: Can MD5 sums be posted for the downloadable files?