Re: Update join performance issues

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Kevin Kempter <cs_dba(at)consistentstate(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Update join performance issues
Date: 2012-04-03 17:39:05
Message-ID: 4F7B35B9.50108@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2012-04-03 17:49:54 Re: Update join performance issues
Previous Message Kevin Grittner 2012-04-03 17:37:50 Re: Update join performance issues