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

Re: GROUP BY vs DISTINCT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Peter Childs" <peterachilds(at)gmail(dot)com>
Cc: "Postgresql Performance" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: GROUP BY vs DISTINCT
Date: 2006-12-20 15:36:38
Message-ID: 22279.1166628998@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Peter Childs" <peterachilds(at)gmail(dot)com> writes:
> Is it actually in the sql spec to sort in a distinct

No.  PG's code that supports GROUP BY is newer and smarter than the code
that supports DISTINCT, is all.  One of the things on the to-do list is
to revise DISTINCT so it can also consider hash-based implementations.
The hard part of that is not to break DISTINCT ON ...

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Michal Taborsky - Internet MallDate: 2006-12-20 15:50:03
Subject: Re: Question: Clustering & Load Balancing
Previous:From: CARMODADate: 2006-12-20 11:25:42
Subject: Question: Clustering & Load Balancing

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