Re: Very slow updates when using IN syntax subselect

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Very slow updates when using IN syntax subselect
Дата
Msg-id 1682.1139607176@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Very slow updates when using IN syntax subselect  (Bryce Nesbitt <bryce1@obviously.com>)
Ответы Re: Very slow updates when using IN syntax subselect  (Bryce Nesbitt <bryce1@obviously.com>)
Список pgsql-sql
Bryce Nesbitt <bryce1@obviously.com> writes:
>     update event set reconciled=true where event_id in
>     (select event_id from event join token using (token_number)
>      where token_status=50 and reconciled=false LIMIT 1);

> On a 4 CPU machine, 2 CPU's peg at 100%, and the request just eats CPU
> forever.

What does EXPLAIN show for this and for the base query?

> PostgreSQL 7.4.1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3

This may be your problem right here.  You are urgently in need of an
update in any case --- there are a lot of nasty bugs fixed since 7.4.1:
http://developer.postgresql.org/docs/postgres/release.html
        regards, tom lane


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

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: unique constraint instead of primary key? what
Следующее
От: Bryce Nesbitt
Дата:
Сообщение: Re: Very slow updates when using IN syntax subselect