From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: David Griffiths <dgriffiths@boats.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Another weird one with an UPDATE
Date: Sun, 12 Oct 2003 18:48:24 -0700 (PDT)
Message-ID: <20031012184536.N5307@megazone.bigpanda.com> (raw)
In-Reply-To: <080d01c3912a$1356dea0$6501a8c0@griffiths2>
References: <052001c39030$1ccc8020$6501a8c0@griffiths2>
<05a401c3903f$a8524850$6501a8c0@griffiths2>
<20031011153251.F57866@megazone.bigpanda.com>
<080d01c3912a$1356dea0$6501a8c0@griffiths2>
On Sun, 12 Oct 2003, David Griffiths wrote:
> [snip]
>
> > I think you want something like:
> > UPDATE user_account SET last_name = 'abc'
> > WHERE EXISTS (SELECT 1 FROM commercial_entity ce, commercial_service cs
> > WHERE user_account.user_account_id = ce.user_account_id AND
> > ce.commercial_entity_id = cs.commercial_entity_id);
>
> Unfort, this is still taking a long time.
Hmm, does
UPDATE user_account SET last_name='abc'
FROM commercial_entity ce, commercial_service cs
WHERE user_account.user_account_id = ce.user_account_id AND
ce.commercial_entity_id=cs.commercial_entity_id;
give the right results... That might end up being faster.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: sszabo@megazone.bigpanda.com, dgriffiths@boats.com
Subject: Re: Another weird one with an UPDATE
In-Reply-To: <20031012184536.N5307@megazone.bigpanda.com>
References: <052001c39030$1ccc8020$6501a8c0@griffiths2> <05a401c3903f$a8524850$6501a8c0@griffiths2> <20031011153251.F57866@megazone.bigpanda.com> <080d01c3912a$1356dea0$6501a8c0@griffiths2> <20031012184536.N5307@megazone.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox