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

From Alexander Farber
Subject Re: Optimizing select count query which often takes over 10 seconds
Date
Msg-id CAADeyWhbf8YLu2CWE4fagE08y54wkcF2nGqYqw71yMin9d+bhw@mail.gmail.com
Whole thread Raw
In response to Re: Optimizing select count query which often takes over 10 seconds  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: Optimizing select count query which often takes over 10 seconds  (Alexander Farber <alexander.farber@gmail.com>)
List pgsql-general
Thanks -

On Sun, Jan 27, 2013 at 8:41 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> Once the week is over, materialize the medals for that week.  Then the
> live part of the query only needs to specify the currently live week,
> not the entire history.  And in that case, the query should be quite
> efficient if you have in index on both week and money.

I will try that!


pgsql-general by date:

Previous
From: Jan Strube
Date:
Subject: Re: Prevent out of memory errors by reducing work_mem?
Next
From: Jose Soares
Date:
Subject: database design best pratice help