Re: Need suggestion on how best to update 3 million rows

From: Nis Jørgensen <nis(at)superlativ(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Need suggestion on how best to update 3 million rows
Date: 2007-09-06 11:39:51
Message-ID: fboouh$t1r$2@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hubert depesz lubaczewski skrev:
> On Thu, Sep 06, 2007 at 11:08:02AM +0200, Alban Hertroys wrote:
>> create index tmp_idx on table(number) where number != trim(number);
>> analyze table;
>> update table set number = trim(number) where number != trim(number);
>
> dont use !=. use <>. != does something different, and in fact it is
> not a real operator - it's just 2 operators bundled together.

Rubbish. From the documentation:

"The != operator is converted to <> in the parser stage. It is not
possible to implement != and <> operators that do different things."

Nis

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Schwarzer 2007-09-06 11:43:25 Alias "all fields"?
Previous Message Merlin Moncure 2007-09-06 11:35:48 Re: Querying database for table pk - better way?