pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Craig A. James <cjames@modgraph-usa.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: explain analyze reports 20x more time than actual
Date: Fri, 30 Jun 2006 02:04:49 -0400
Message-ID: <20524.1151647489@sss.pgh.pa.us> (raw)
In-Reply-To: <44A4AE1A.4070308@modgraph-usa.com>
References: <448C505C.2080504@modgraph-usa.com>
	<87ac8jfu7t.fsf@stark.xeocode.com>
	<448E5A92.9050206@modgraph-usa.com>
	<22609.1150209419@sss.pgh.pa.us>
	<44A4AE1A.4070308@modgraph-usa.com>

"Craig A. James" <cjames@modgraph-usa.com> writes:
> I have a query that needs to run faster, with the obvious solution
> being to add an index.  But to confirm this, I ran explain analyze.
> When I run the actual query, it consistently takes 6-7 seconds by the
> wall clock.  My application with a "verbose" mode enabled reports 6.6
> seconds consistently.  However, when I run EXPLAIN ANALYZE, it takes
> 120 seconds!

See recent discussions --- if you've got duff PC hardware, it seems that
reading the clock takes forever :-(.  In this case I'd assume that the
cost of the seqscan (11497361 rows returned) is being overstated because
of the 2*11497361 gettimeofday calls involved.

			regards, tom lane



view thread (2+ messages)

Message-ID: <20524.1151647489@sss.pgh.pa.us>
Permalink:  ../20524.1151647489@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20524.1151647489@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, cjames@modgraph-usa.com
  Subject: Re: explain analyze reports 20x more time than actual
  In-Reply-To: <20524.1151647489@sss.pgh.pa.us>

* 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