From: Tom Lane <tgl@sss.pgh.pa.us>
To: A Palmblad <adampalmblad@yahoo.ca>
Cc: Postgres Performance <pgsql-performance@postgresql.org>
Subject: Re: SLOW query with aggregates
Date: Tue, 23 Mar 2004 15:32:08 -0500
Message-ID: <28366.1080073928@sss.pgh.pa.us> (raw)
In-Reply-To: <003201c41111$f4dc96f0$97019696@AERS04>
References: <003201c41111$f4dc96f0$97019696@AERS04>
"A Palmblad" <adampalmblad@yahoo.ca> writes:
> GroupAggregate (cost=0.00..338300.34 rows=884 width=345) (actual
> time=86943.272..382718.104 rows=3117 loops=1)
> -> Merge Join (cost=0.00..93642.52 rows=1135610 width=345) (actual
> time=0.148..24006.748 rows=1120974 loops=1)
You do not have a planning problem here, and trying to change the plan
is a waste of time. The slowness is in the actual computation of the
aggregate functions; ergo the only way to speed it up is to change what
you're computing. What aggregates are you computing exactly, and over
what datatypes?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, adampalmblad@yahoo.ca
Subject: Re: SLOW query with aggregates
In-Reply-To: <28366.1080073928@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox