Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Prepared statements, parameters and logging


  • From: Oliver Jowett <oliver(at)opencloud(dot)com>
  • To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
  • Cc: Dave Cramer <pg(at)fastcrypt(dot)com>, Postgres JDBC <pgsql-jdbc(at)postgresql(dot)org>
  • Subject: Re: Prepared statements, parameters and logging
  • Date: Tue, 26 Jun 2007 10:07:44 +1200
  • Message-id: <46803CB0.2000009@opencloud.com> <text/plain>

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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group