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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-sql by date

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