Re: What's the fastest way to do this?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: o2(at)trustcommerce(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: What's the fastest way to do this?
Date: 2001-11-12 21:28:27
Message-ID: 19468.1005600507@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Orion <o2(at)trustcommerce(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Frank Bax 2001-11-12 22:53:13 Re: 7.0.2 -> 7.1 performance drop
Previous Message Stephan Szabo 2001-11-12 20:57:36 Re: What's the fastest way to do this?