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

Поиск
Список
Период
Сортировка
От Feite Brekeveld
Тема update ... from where id in (..) question
Дата
Msg-id 3AEFC5BD.91695D85@osiris-it.nl
обсуждение исходный текст
Ответы Re: update ... from where id in (..) question  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: update ... from where id in (..) question  (Joel Burton <jburton@scw.org>)
Список pgsql-general
Hi,

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.


Has someone an explanation for this ?


--
Feite Brekeveld
feite.brekeveld@osiris-it.nl



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

Предыдущее
От: "Gregory Wood"
Дата:
Сообщение: Update Triggers & NULLs
Следующее
От: mkb
Дата:
Сообщение: RE: Ideal hardware configuration for pgsql