Re: DISTINCT vs. GROUP BY

From: Neil Conway <neilc(at)samurai(dot)com>
To: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: DISTINCT vs. GROUP BY
Date: 2005-09-19 14:52:45
Message-ID: 1127141565.3770.5.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2005-19-09 at 16:27 +0200, Hans-Jürgen Schönig wrote:
> I was wondering whether it is possible to teach the planner to handle
> DISTINCT in a more efficient way:
[...]
> Isn't it possible to perform the same operation using a
> HashAggregate?

One problem is that DISTINCT ON is defined to return the first unique
row (according to the query's ORDER BY) for the set of DISTINCT ON
columns, which can't easily be done via hashing.

-Neil

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-09-19 14:53:44 Re: New dot releases
Previous Message Devrim GUNDUZ 2005-09-19 13:01:42 Re: New dot releases