pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: dev@kbsolutions.ch
Cc: pgsql-sql@postgresql.org
Subject: Re: update from select
Date: Mon, 29 Oct 2007 14:42:57 -0400
Message-ID: <14485.1193683377@sss.pgh.pa.us> (raw)
In-Reply-To: <0f0501c81a40$538ce1b0$1601a8c0@kbsc1>
References: <0d5e01c81a0c$b0f67250$1601a8c0@kbsc1>
	<20071029104529.GB16653@a-kretschmer.de>
	<0f0501c81a40$538ce1b0$1601a8c0@kbsc1>

<dev@kbsolutions.ch> writes:
> Hash Join  (cost=10827.45..25950.05 rows=4906 width=1191) (actual
> time=586.251..2852.691 rows=111306 loops=1)
> ...
> Total runtime: 633548.404 ms

So you're worried about the wrong thing entirely.  The query is taking
less than 3 seconds, which may be reasonable considering it's producing
111000 join rows.  The big problem is the other 630 seconds, which is
evidently update overhead.  I'm wondering if you have any triggers or
foreign keys leading to or from this table.

			regards, tom lane



view thread (10+ messages)

Message-ID: <14485.1193683377@sss.pgh.pa.us>
Permalink:  ../14485.1193683377@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14485.1193683377@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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dev@kbsolutions.ch
  Subject: Re: update from select
  In-Reply-To: <14485.1193683377@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