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

From Andrew Dunstan
Subject Re: Update join performance issues
Date
Msg-id 4F7B35B9.50108@dunslane.net
Whole thread Raw
In response to Update join performance issues  (Kevin Kempter <cs_dba@consistentstate.com>)
Responses Re: Update join performance issues  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-performance

On 04/03/2012 01:29 PM, Kevin Kempter wrote:
> 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


Why is test_one in the from clause? update joins whatever is in the from
clause to the table being updated. You almost never need it repeated in
the from clause.


cheers

andrew




pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Update join performance issues
Next
From: "Kevin Grittner"
Date:
Subject: Re: Update join performance issues