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

Re: possible bug with group by?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: Stephan Szabo <sszabo(at)kick(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: possible bug with group by?
Date: 2000-05-25 02:59:58
Message-ID: 19251.959223598@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-sql
Joseph Shraibman <jks(at)selectacast(dot)net> writes:
> But why would group by need to sort it?  To insert it into a tree to
> make lookups of distinct values faster?

No, to bring identical values together.  GROUP BY and DISTINCT are both
implemented as basically a "sort | uniq" pipeline.

			regards, tom lane

In response to

pgsql-sql by date

Next:From: Tom LaneDate: 2000-05-25 03:12:32
Subject: Re: Use of index in 7.0 vs 6.5
Previous:From: Chris BitmeadDate: 2000-05-25 00:02:37
Subject: Re: [HACKERS]

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