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

Re: DISTINCT -> GROUP BY

From: David Fetter <david(at)fetter(dot)org>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DISTINCT -> GROUP BY
Date: 2008-06-03 14:03:06
Message-ID: 20080603140306.GD22141@fetter.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Jun 03, 2008 at 03:36:44PM +0200, Pavel Stehule wrote:
> Hello David
> 
> http://www.postgresql.org/docs/faqs.TODO.html
> 
> Consider using hash buckets to do DISTINCT, rather than sorting This
> would be beneficial when there are few distinct values. This is
> already used by GROUP BY.

It's nice to see that this is kinda on the TODO, but it doesn't
address the question I asked, which is, "how would I get the planner
to rewrite DISTINCTs as the equivalent GROUP BYs?" :)

Any hints?

Cheers,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2008-06-03 14:10:35
Subject: Re: DISTINCT -> GROUP BY
Previous:From: Pavel StehuleDate: 2008-06-03 13:36:44
Subject: Re: DISTINCT -> GROUP BY

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