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

From: Feite Brekeveld <feite(dot)brekeveld(at)osiris-it(dot)nl>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: update ... from where id in (..) question
Date: 2001-05-02 08:30:53
Message-ID: 3AEFC5BD.91695D85@osiris-it.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)brekeveld(at)osiris-it(dot)nl

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karel Zak 2001-05-02 08:35:16 Re: chr() command in PG7.03?
Previous Message Martín Marqués 2001-05-02 08:14:02 delete with cascade