update ... from where id in (..) question - Mailing list pgsql-general

From Feite Brekeveld
Subject update ... from where id in (..) question
Date
Msg-id 3AEFC5BD.91695D85@osiris-it.nl
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: "Gregory Wood"
Date:
Subject: Update Triggers & NULLs
Next
From: mkb
Date:
Subject: RE: Ideal hardware configuration for pgsql