Re: :Posgres - performance problem - Mailing list pgsql-general

From Marc Mamin
Subject Re: :Posgres - performance problem
Date
Msg-id B6F6FD62F2624C4C9916AC0175D56D8828BA8900@jenmbs01.ad.intershop.net
Whole thread Raw
In response to :Posgres - performance problem  (ginkgo36 <ginkgo56@gmail.com>)
List pgsql-general
> update master_items set "feedback_to_de" = 'Yes'
>--Query returned successfully: 591268 rows affected, 1589335 ms execution time.


Here you should better use
update master_items set feedback_to_de = 'Yes' WHERE feedback_to_de <> 'Yes'
OR
update master_items set feedback_to_de <> 'Yes'  WHERE feedback_to_de IS DISTINCT FROM 'Yes'
depending on the column nullable.

regards,
Marc Mamin



pgsql-general by date:

Previous
From: "Leonardo M. Ramé"
Date:
Subject: Re: Column does not exists?
Next
From: Andreas Kretschmer
Date:
Subject: Re: 9.4+ partial log-shipping possible?