Re: group by

From: Kathy Zhu <Kathy(dot)Zhu(at)sun(dot)com>
To: Kathy(dot)Zhu(at)sun(dot)com, bruno(at)wolff(dot)to
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: group by
Date: 2003-10-06 15:23:05
Message-ID: 200310061523.h96FN8c22512@amon.Central.Sun.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

That was also one of my guesses why groupby takes longer, although it is not
mentioned in the doc.
thanks !!!
kathy

> Date: Sat, 4 Oct 2003 11:23:48 -0500
> From: Bruno Wolff III <bruno(at)wolff(dot)to>
> To: Kathy Zhu <Kathy(dot)Zhu(at)sun(dot)com>
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] group by
> Mail-Followup-To: Kathy Zhu <Kathy(dot)Zhu(at)Sun(dot)COM>, pgsql-general(at)postgresql(dot)org
> Content-Disposition: inline
> User-Agent: Mutt/1.5.4i
>
> On Fri, Oct 03, 2003 at 17:32:22 -0600,
> Kathy Zhu <Kathy(dot)Zhu(at)Sun(dot)COM> wrote:
> > I did a vacuum and got the same result.
> > I think the problem lies in there is swapping going for groupby when there
is a
> > large number of rows in the table, 5000 in this case.
> >
> > I guess I have to use group by with caution.
>
> In 7.4 you will probably find the results more compatible.
> For 7.3 and lower, the first case will use a sort to do a group by.
> No sort will be done in the second example.
> In 7.4 the groub by will use the new hash aggregate method and will
> probably be significantly faster than the second way of doing things.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jillian Carroll 2003-10-06 15:23:09 Re: Call for Speakers / Presenters
Previous Message scott.marlowe 2003-10-06 15:11:05 Re: Call for Speakers / Presenters