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

From: "Gregory Wood" <gregw(at)com-stock(dot)com>
To: "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: update ... from where id in (..) question
Date: 2001-05-02 19:34:00
Message-ID: 035801c0d33e$d7936c90$7889ffcc@comstock.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> 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 ?

http://www.postgresql.org/docs/faq-english.html#4.23

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2001-05-02 19:38:06 Re: Re: Stranger than fiction - EXPLAIN results
Previous Message Doug McNaught 2001-05-02 19:33:36 Re: Update Triggers & NULLs