Re: URGENT HELP about 'duration' stats - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: URGENT HELP about 'duration' stats
Date
Msg-id 20071030210400.GA2568@alvh.no-ip.org
Whole thread Raw
In response to URGENT HELP about 'duration' stats  (Camilo Porto <camiloporto@hotmail.com>)
List pgsql-hackers
Camilo Porto wrote:

> In some tests I have done, I have found these results:
> - Total Time interval which BenchmarkSQL submitted queries = 30 seconds
> 
> - sum of executor's duration time during this period of time = 2
> minutes and 36 seconds!! (5x longer than total time) 

Are you sure you're not confusing the units?  The log you posted shows
milliseconds ...

Another thought is that some queries may count the time more than once.
For example if you submit an UPDATE that acts on a table with foreign
keys, and then the SELECT FOR UPDATE that the FK code does internally is
also logged, I think the UPDATE would include the time consumed in the
SELECT FOR UPDATE.  So if you just sum both, the total obtained would
include the SELECT FOR UPDATE twice.  This is just a wild guess; I'm not
sure if the queries for FKs checking are logged.

-- 
Alvaro Herrera       Valdivia, Chile   ICBM: S 39º 49' 18.1", W 73º 13' 56.4"
"Everybody understands Mickey Mouse. Few understand Hermann Hesse.
Hardly anybody understands Einstein. And nobody understands Emperor Norton."


pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: problem with pgAdmin beta2 on w2k3
Next
From: "Gevik Babakhani"
Date:
Subject: Re: Proposal TODO Item: SQL-language reference parameters by name