pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Michael Fuhr <mike@fuhr.org>
Cc: Richard Huxton <dev@archonet.com>
Cc: Jozsef Szalay <jszalay@storediq.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Incorrect Total runtime Reported by Explain Analyze!?
Date: Thu, 26 Jan 2006 11:59:49 -0600
Message-ID: <1138298389.22740.11.camel@state.g2switchworks.com> (raw)
In-Reply-To: <20060126175723.GA83137@winnie.fuhr.org>
References: <E387E2E9622FDD408359F98BF183879E2BDE92@dc1.storediq.com>
	<43D8FDB7.10905@archonet.com>
	<20060126175723.GA83137@winnie.fuhr.org>

On Thu, 2006-01-26 at 11:57, Michael Fuhr wrote:
> On Thu, Jan 26, 2006 at 04:49:59PM +0000, Richard Huxton wrote:
> > Jozsef Szalay wrote:
> > >I have seen it on occasion that the total runtime reported by explain
> > >analyze was much higher than the actual time the query needed to
> > >complete. The differences in my case ranged between 20-120 seconds. I'm
> > >just curious if anyone else has experienced this and whether there is
> > >something that I can do to convince explain analyze to report the
> > >execution time of the query itself rather than the time of its own
> > >execution. Engine version is 8.1.1.
> > 
> > I think it's down to all the gettime() calls that have to be made to 
> > measure how long each stage of the query takes. In some cases these can 
> > take a substantial part of the overall query time.
> 
> Another possibility is that the total query time was indeed that
> long because the query was blocked waiting for a lock.  For example:

Could be, but I've had this happen where the query returned in like 1
second but reported 30 seconds run time.



view thread (7+ messages)  latest in thread

Message-ID: <1138298389.22740.11.camel@state.g2switchworks.com>
Permalink:  ../1138298389.22740.11.camel@state.g2switchworks.com/
Also on:    postgresql.org/message-id/1138298389.22740.11.camel@state.g2switchworks.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: smarlowe@g2switchworks.com, mike@fuhr.org, dev@archonet.com, jszalay@storediq.com
  Subject: Re: Incorrect Total runtime Reported by Explain Analyze!?
  In-Reply-To: <1138298389.22740.11.camel@state.g2switchworks.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