Re: slow update

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: slow update
Дата
Msg-id 20030430173303.GA8964@wolff.to
обсуждение исходный текст
Ответ на slow update  ("Chad Thompson" <chad@weblinkservices.com>)
Список pgsql-novice
On Wed, Apr 30, 2003 at 10:12:35 -0600,
  Chad Thompson <chad@weblinkservices.com> wrote:
> Hey guys/gals
> I have a update that is slow and I cant get my head around a way to make it
> faster.
>
> update table set id = '555'
> where id in (select id from different_table)
>
> pretty simple... i tried using exists as well.. but it still seems to be
> very slow.

This will probably run faster in 7.4 as "in" has been improved.

If id is a unique column in different table, then you might try the following:
update table set id = '555' from different_table where table.id =
  different_table.id


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

Предыдущее
От: "Chad Thompson"
Дата:
Сообщение: slow update
Следующее
От: radha.manohar@ndsu.nodak.edu
Дата:
Сообщение: Re: Debug option