Re: Another weird one with an UPDATE

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Another weird one with an UPDATE
Дата
Msg-id 20031012184536.N5307@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: Another weird one with an UPDATE  (David Griffiths <dgriffiths@boats.com>)
Список pgsql-performance
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.

В списке pgsql-performance по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: Another weird one with an UPDATE
Следующее
От: pginfo
Дата:
Сообщение: Re: go for a script! / ex: PostgreSQL vs. MySQL