Re: *very* slow query to summarize data for a month ... - Mailing list pgsql-performance

From Marc G. Fournier
Subject Re: *very* slow query to summarize data for a month ...
Date
Msg-id 20031112120814.H56037@ganymede.hub.org
Whole thread Raw
In response to Re: *very* slow query to summarize data for a month ...  (Greg Stark <gsstark@mit.edu>)
List pgsql-performance

On Wed, 12 Nov 2003, Greg Stark wrote:

>
> "Marc G. Fournier" <scrappy@postgresql.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 ...


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Seeking help with a query that takes too long
Next
From: "Nick Fankhauser"
Date:
Subject: Re: Seeking help with a query that takes too long