Re: DISTINCT -> GROUP BY - Mailing list pgsql-hackers

From David Fetter
Subject Re: DISTINCT -> GROUP BY
Date
Msg-id 20080603140306.GD22141@fetter.org
Whole thread Raw
In response to Re: DISTINCT -> GROUP BY  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Responses Re: DISTINCT -> GROUP BY  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Re: DISTINCT -> GROUP BY  (Decibel! <decibel@decibel.org>)
List 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@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

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


pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: DISTINCT -> GROUP BY
Next
From: "Pavel Stehule"
Date:
Subject: Re: DISTINCT -> GROUP BY