Re: Update join performance issues

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Update join performance issues
Date: 2012-04-03 17:51:21
Message-ID: jlfdag$o7s$2@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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"

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tomas Vondra 2012-04-03 18:01:16 Re: H800 + md1200 Performance problem
Previous Message Kevin Grittner 2012-04-03 17:49:54 Re: Update join performance issues