Re: update ... from where id in (..) question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: update ... from where id in (..) question
Дата
Msg-id 17224.988842348@sss.pgh.pa.us
обсуждение исходный текст
Ответ на update ... from where id in (..) question  (Feite Brekeveld <feite.brekeveld@osiris-it.nl>)
Список pgsql-general
Feite Brekeveld <feite.brekeveld@osiris-it.nl> writes:
> I have a table with approx.  2mln records.
> There were a few for which I had to update statusfield, so I did:
>         update table set statusflag = 'U' where id in ('id10', 'id20',
> 'id30');
> this took so long that I cancelled it, and used separate
>         update table set statusflag = 'U' where id = 'id10';
> statements, which were executed in a fraction of a second.

What postgres version?  What does EXPLAIN show for the two queries?
Have you VACUUM ANALYZEd that table recently?

            regards, tom lane

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

Предыдущее
От: Joel Burton
Дата:
Сообщение: Re: Security and performance
Следующее
От: David Scholes
Дата:
Сообщение: Tuple Max Size on 7.1