pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Shawn <postgres@xmtservices.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow Query
Date: Sat, 01 Sep 2007 23:00:10 -0400
Message-ID: <25184.1188702010@sss.pgh.pa.us> (raw)
In-Reply-To: <20070901173519.0ed11401@boffin.xmtservices.net>
References: <20070901102947.0c0a50a3@boffin.xmtservices.net>
	<22800.1188670194@sss.pgh.pa.us>
	<20070901131816.3f7ef91a@boffin.xmtservices.net>
	<20070901173519.0ed11401@boffin.xmtservices.net>

Shawn <postgres@xmtservices.net> writes:
> The query just ran and here is the basic output:

> UPDATE 15445
> Time: 22121.141 ms

> and

> explain ANALYZE update shawns_data set alias = null;
>                                                     QUERY PLAN                                        
> -----------------------------------------------------------------------------------------------------------------
>  Seq Scan on shawns_data  (cost=0.00..465.45 rows=15445 width=480) (actual time=0.034..67.743 rows=15445 loops=1)
>  Total runtime: 1865.002 ms
> (2 rows)

Hmmm ... did you run the real query and the EXPLAIN in immediate
succession?  If so, the only reason I can think of for the speed
difference is that all the rows were fetched already for the second
run.  Which doesn't make a lot of sense given the hardware specs
you mentioned.  Try watching "vmstat 1" and see if there's some
noticeable difference in the behavior.

			regards, tom lane



view thread (112+ messages)  latest in thread

Message-ID: <25184.1188702010@sss.pgh.pa.us>
Permalink:  ../25184.1188702010@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25184.1188702010@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, postgres@xmtservices.net
  Subject: Re: Slow Query
  In-Reply-To: <25184.1188702010@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