Re: slow update

From: Janning Vygen <vygen(at)gmx(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: slow update
Date: 2002-07-26 17:12:35
Message-ID: 200207261712.g6QHCaM03037@janning.planwerk6.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am Freitag, 26. Juli 2002 16:46 schrieb Andrew Sullivan:
> On Fri, Jul 26, 2002 at 03:14:37PM +0200, Janning Vygen wrote:
> > UPDATE real
> > SET val1=(SELECT val1 FROM temp WHERE temp.id = real.id ),
> > val2=(SELECT val2 FROM temp WHERE temp.id = real.id )
> > WHERE id IN (SELECT temp.id FROM temp);
>
> Ick. IN is a well-known dog in Postgres. Try this:
>
> UPDATE real
> SET val1=temp.val1,val2=temp.val2
> WHERE id=temp.id;

oh thanks a lot! this is MUCH faster! but it occurs another problem...
.. but this should be posted in another thread...

kind regards
janning

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2002-07-26 17:15:42 Re: Advice on geolocation
Previous Message Elielson Fontanezi 2002-07-26 17:09:29 Numeric Style format