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

Re: explain analyze query execution time

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <rudyar(dot)cortes(at)gmail(dot)com>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: explain analyze query execution time
Date: 2011-11-22 05:58:57
Message-ID: 4ECAE5C2020000250004336D@gw.wicourts.gov (view raw)
Rudyar  wrote:
 
> I try to get the execution time of a query workload. I try using
> explain analyze but this time is allways higher than the execution
> time of a query across a client like pgadmin3
> 
> what is the reason about that difference?
 
It's the "observer effect" -- there is a cost to the timing,
counting, measuring, and reporting which is done by EXPLAIN ANALYZE,
which distorts what is being measured.  It's just about impossible to
avoid entirely.
 
-Kevin

From: Rudyar <rudyar(dot)cortes(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: explain analyze query execution time
Date: 2011-11-22 12:52:33
Message-ID: 4ECB9B11.2070604@gmail.com (view raw)
On 22/11/11 02:58, Kevin Grittner wrote:
> Rudyar  wrote:
>
>> I try to get the execution time of a query workload. I try using
>> explain analyze but this time is allways higher than the execution
>> time of a query across a client like pgadmin3
>>
>> what is the reason about that difference?
>
> It's the "observer effect" -- there is a cost to the timing,
> counting, measuring, and reporting which is done by EXPLAIN ANALYZE,
> which distorts what is being measured.  It's just about impossible to
> avoid entirely.
>
> -Kevin
Thanks kevin,

what tool you recommend for measure the query "real" query execution time?

-- 
Rudyar Cortés.
Estudiante de Ingeniería Civil Informática
Universidad Técnica Federico Santa María.



Privacy Policy | About PostgreSQL
Copyright © 1996-2013 The PostgreSQL Global Development Group