Skip site navigation (1) Skip section navigation (2)

Re: Speeding up aggregates

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: PgSQL Performance ML <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Speeding up aggregates
Date: 2002-12-07 15:48:36
Message-ID: 1039276116.17192.4.camel@haggis (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Fri, 2002-12-06 at 14:46, Tom Lane wrote:
> "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.


What exactly is "hashed aggregation"?

>From Josh Berkus' email with the EXPLAIN data, it still looks like
supporting indexes aren't used, so are you still scanning the table?

| Ron Johnson, Jr.     mailto:ron(dot)l(dot)johnson(at)cox(dot)net          |
| Jefferson, LA  USA  |
|                                                            |
| "they love our milk and honey, but preach about another    |
|  way of living"                                            |
|    Merle Haggard, "The Fighting Side Of Me"                |

In response to

pgsql-performance by date

Next:From: Richard HuxtonDate: 2002-12-07 17:13:08
Subject: Re: Query optimization
Previous:From: Fred MoyerDate: 2002-12-07 02:16:43
Subject: Query optimization

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group