From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Is Hash Agg being used? 7.4 seems to handle this query worse than 7.3 |
Date: | 2003-02-11 17:14:50 |
Message-ID: | 26461.1044983690@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> There's only a small decrease in speed from 7.3 to CVS now, but I was hoping
> for a big speed increase from hash aggregates since most of the time is being
> sunk into that sort. But it definitely isn't using them. I guess TNSTAAFL.
It looks like it's avoiding the hash choice because it thinks there will
be many groups, 15122 to be exact:
> -> GroupAggregate (cost=2686.58..2951.21 rows=15122 width=24) (actual time=917.64..1033.40 rows=31 loops=1)
You could probably persuade it that hashed aggregation will be okay by
increasing sort_mem sufficiently. But it would also be interesting to
see if the number-of-groups estimate can be improved ... 15122 is rather
badly off from the true value of 31 ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-02-11 17:21:56 | Re: Is Hash Agg being used? 7.4 seems to handle this query worse than 7.3 |
Previous Message | Greg Stark | 2003-02-11 17:14:05 | Re: Is Hash Agg being used? 7.4 seems to handle this query worse than 7.3 |