pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-performance@postgresql.org
Subject: Re: Update join performance issues
Date: Tue, 03 Apr 2012 19:51:21 +0200
Message-ID: <jlfdag$o7s$2@dough.gmane.org> (raw)
In-Reply-To: <4F7B3394.3030703@consistentstate.com>
References: <4F7B3394.3030703@consistentstate.com>

Kevin Kempter wrote on 03.04.2012 19:29:
> Hi All;
>
> I have a query that wants to update a table based on a join like this:
>
> update test_one
> set f_key = t.f_key
> from
> upd_temp1 t,
> test_one t2
> where
> t.id_number = t2.id_number
>
> upd_temp1 has 248,762 rows
> test_one has 248,762 rows
>

To extend on what Kevin has already answere:

Quote from the manual:
   "Note that the target table must not appear in the from_list, unless you intend a self-join"





view thread (6+ messages)  latest in thread

Message-ID: <jlfdag$o7s$2@dough.gmane.org>
Permalink:  ../jlfdag$o7s$2@dough.gmane.org/
Also on:    postgresql.org/message-id/jlfdag$o7s$2@dough.gmane.org

 · 

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: spam_eater@gmx.net
  Subject: Re: Update join performance issues
  In-Reply-To: <jlfdag$o7s$2@dough.gmane.org>

* 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