Re: Update join performance issues - Mailing list pgsql-performance

From Thomas Kellerer
Subject Re: Update join performance issues
Date
Msg-id jlfdag$o7s$2@dough.gmane.org
Whole thread Raw
In response to Update join performance issues  (Kevin Kempter <cs_dba@consistentstate.com>)
List 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"


pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Update join performance issues
Next
From: Tomas Vondra
Date:
Subject: Re: H800 + md1200 Performance problem