Re: What's the fastest way to do this? - Mailing list pgsql-general

From Tom Lane
Subject Re: What's the fastest way to do this?
Date
Msg-id 19468.1005600507@sss.pgh.pa.us
Whole thread Raw
In response to Re: What's the fastest way to do this?  (Orion <o2@trustcommerce.com>)
List pgsql-general
Orion <o2@trustcommerce.com> writes:
> UPDATE test
>         SET description = x.description
>         FROM test AS rt, test_tmp AS x
>         WHERE rt.code = x.code;

This command is a three-way join between test AS test (the target),
test AS rt, and test_tmp AS x.  Almost certainly not what you want,
especially considering that the target table is not constrained at
all by the WHERE clause.

            regards, tom lane

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: What's the fastest way to do this?
Next
From: Frank Bax
Date:
Subject: Re: 7.0.2 -> 7.1 performance drop