On Jun 3, 2008, at 9:03 AM, David Fetter wrote:
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?" :)

IIRC, the patch to allow GROUP BY to do hashing is fairly recent... you could probably find it in archives.
--
Decibel!, aka Jim C. Nasby, Database Architect  [EMAIL PROTECTED]
Give your computer some brain candy! www.distributed.net Team #1828


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to