Re: *very* slow query to summarize data for a month ...

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, pgsql-performance(at)postgresql(dot)org
Subject: Re: *very* slow query to summarize data for a month ...
Date: 2003-11-12 16:08:56
Message-ID: 20031112120814.H56037@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 12 Nov 2003, Greg Stark wrote:

>
> "Marc G. Fournier" <scrappy(at)postgresql(dot)org> writes:
>
> > Just as a side note, just doing a straight scan for the records, with no
> > SUM()/GROUP BY involved, with the month_trunc() index is still >8k msec:
>
> One of the other advantages of these aggregate tables was that we could
> purge the old data much sooner with much less resistance from the
> business. Since the reports were all still available and a lot of ad-hoc
> queries could still be done without the raw data anyways.

Actually, what I've done is do this at the 'load stage' ... but same
concept ...

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-11-12 16:10:34 Re: Seeking help with a query that takes too long
Previous Message Nick Fankhauser 2003-11-12 16:05:10 Re: Seeking help with a query that takes too long