Re: Speeding up aggregates

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Speeding up aggregates
Date: 2002-12-06 20:46:05
Message-ID: 12845.1039207565@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Josh Berkus" <josh(at)agliodbs(dot)com> writes:
> What have other Postgres users done to speed up aggregates on large
> tables?

FWIW, I've implemented hashed aggregation in CVS tip. I have not had
the time to try to benchmark it, but I'd be interested if anyone can
run some tests on 7.4devel. Eliminating the need for a SORT step
should help aggregations over large datasets.

Note that even though there's no SORT, the sort_mem setting is used
to determine the allowable hashtable size, so a too-small sort_mem
might discourage the planner from selecting hashed aggregation.
Use EXPLAIN to see which query plan gets chosen.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2002-12-06 21:05:00 Re: ALTER TABLE .. < ADD | DROP > OIDS
Previous Message Rod Taylor 2002-12-06 20:35:32 Re: ALTER TABLE .. < ADD | DROP > OIDS