Re: Printing query durations

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Printing query durations
Дата
Msg-id 1143541956.3839.329.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Printing query durations  (Kevin Dorne <kevin@catalyst.net.nz>)
Ответы Re: Printing query durations
Re: Printing query durations
Список pgsql-jdbc
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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kevin Dorne
Дата:
Сообщение: Re: Printing query durations
Следующее
От: Markus Schaber
Дата:
Сообщение: Re: Printing query durations