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
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