Re: Optimizing select count query which often takes over 10 seconds - Mailing list pgsql-general

From Kevin Grittner
Subject Re: Optimizing select count query which often takes over 10 seconds
Date
Msg-id 1359500966.5795.YahooMailNeo@web162905.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: Optimizing select count query which often takes over 10 seconds  (Alexander Farber <alexander.farber@gmail.com>)
Responses Re: Optimizing select count query which often takes over 10 seconds
List pgsql-general
Alexander Farber <alexander.farber@gmail.com> wrote:

> update pref_users set medals = 0;
> UPDATE 223456

You're probably going to like your performance a lot better if you
modify that to:

update pref_users set medals = 0 where medals <> 0;

-Kevin



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Is there a way to add a detail message in a warning with pl/Python?
Next
From: Tim Uckun
Date:
Subject: Dropping default privileges.