Re: Optimizing select count query which often takes over 10 seconds

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To:
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Optimizing select count query which often takes over 10 seconds
Date: 2013-01-28 07:57:39
Message-ID: CAADeyWhbf8YLu2CWE4fagE08y54wkcF2nGqYqw71yMin9d+bhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks -

On Sun, Jan 27, 2013 at 8:41 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)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!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fredrik.HuitfeldtMadsen 2013-01-28 09:03:39 Re: [pgpool-general: 1315] Re: Database connections seemingly hanging
Previous Message Jan Strube 2013-01-28 07:47:53 Re: Prevent out of memory errors by reducing work_mem?