Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group