pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Childs <peterachilds@gmail.com>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: GROUP BY vs DISTINCT
Date: Wed, 20 Dec 2006 10:36:38 -0500
Message-ID: <22279.1166628998@sss.pgh.pa.us> (raw)
In-Reply-To: <a2de01dd0612200316g92cc189jf3369ccedf1b8c12@mail.gmail.com>
References: <20061220071940.17382.qmail@web52303.mail.yahoo.com>
	<20061220105739.GB31739@uio.no>
	<a2de01dd0612200316g92cc189jf3369ccedf1b8c12@mail.gmail.com>

"Peter Childs" <peterachilds@gmail.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



view thread (4+ messages)

Message-ID: <22279.1166628998@sss.pgh.pa.us>
Permalink:  ../22279.1166628998@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22279.1166628998@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peterachilds@gmail.com
  Subject: Re: GROUP BY vs DISTINCT
  In-Reply-To: <22279.1166628998@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox