Re: Strange query duration

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Fernando Hevia <fhevia(at)ip-tel(dot)com(dot)ar>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Strange query duration
Date: 2008-07-22 20:18:16
Message-ID: 20080722131501.W52351@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, 22 Jul 2008, Fernando Hevia wrote:

> I just enabled log duration in a 8.3.1 database and got puzzling
> information.
> I have a daemon shell-script run every 10 seconds the following:
>
> psql -c "select f_tasador();"
>
> The 'f_tasador' procedure is quite fast. As per log output I can see the
> procedure completes its execution within one second. Nevertheless in the LOG
> duration entry it shows a statement duration of over 36 secs.

I think you're misleading the log. It's showing a number of milliseconds
(ms) not seconds.

> 2008-07-22 15:52:37 ART|postgres| LOG: statement: select f_tasador();
> 2008-07-22 15:52:37 ART|postgres| LOG: duration: 38.154 ms
> 2008-07-22 15:52:47 ART|postgres| LOG: statement: select f_tasador();
> 2008-07-22 15:52:47 ART|postgres| LOG: duration: 36.781 ms

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma 2008-07-22 20:19:08 Re: Strange query duration
Previous Message Fernando Hevia 2008-07-22 19:10:55 Strange query duration