pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Kevin Dorne <kevin@catalyst.net.nz>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Printing query durations
Date: Tue, 28 Mar 2006 07:12:44 -0500
Message-ID: <FC0183F9-41C7-4EC3-B6E7-6EC2A5142D2E@fastcrypt.com> (raw)
In-Reply-To: <1143541956.3839.329.camel@localhost.localdomain>
References: <442890D9.40905@catalyst.net.nz>
	<1143541956.3839.329.camel@localhost.localdomain>

Simon,

What happens if I turn log_duration on ? Doesn't it prepend the  
duration to every log ?

Dave
On 28-Mar-06, at 5:32 AM, Simon Riggs wrote:

> On Tue, 2006-03-28 at 13:26 +1200, Kevin Dorne wrote:
>
>> I am having some trouble getting PostgreSQL to log durations with
>> statements when called through JDBC.  They appear just fine with
>> interactive queries using psql, but the duration field does not  
>> show up
>> on JDBC queries.
>>
>> Is there some configuration I need to pass to the JDBC driver?
>
> These two logging formats are each produced by different parameters:
>
>> Example output from an interactive query:
>> LOG:  duration: 109.524 ms  statement: SELECT count(*) FROM  
>> transaction;
>
> This is produced by log_min_duration_statement > -1
> These lines always have duration prefixes.
>
>> Example output from a JDBC query:
>> LOG:  statement: SELECT count(*) FROM transaction;
>
> This is produced by log_statement = 'all'
> These lines never have durations.
> If you want the matching durations, use log_duration = on and read the
> manual to see how to match them up.
>
> The same statement can be logged twice using those options.
>
> http://www.postgresql.org/docs/8.1/static/runtime-config- 
> logging.html#RUNTIME-CONFIG-LOGGING-WHAT
>
> Does that answer your query?
>
> Best Regards, Simon Riggs
>
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that  
> your
>        message can get through to the mailing list cleanly
>




view thread (17+ messages)  latest in thread

Message-ID: <FC0183F9-41C7-4EC3-B6E7-6EC2A5142D2E@fastcrypt.com>
Permalink:  ../FC0183F9-41C7-4EC3-B6E7-6EC2A5142D2E@fastcrypt.com/
Also on:    postgresql.org/message-id/FC0183F9-41C7-4EC3-B6E7-6EC2A5142D2E@fastcrypt.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: pg@fastcrypt.com, simon@2ndquadrant.com, kevin@catalyst.net.nz
  Subject: Re: Printing query durations
  In-Reply-To: <FC0183F9-41C7-4EC3-B6E7-6EC2A5142D2E@fastcrypt.com>
  References: <442890D9.40905@catalyst.net.nz> <1143541956.3839.329.camel@localhost.localdomain> <FC0183F9-41C7-4EC3-B6E7-6EC2A5142D2E@fastcrypt.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