Re: DISTINCT -> GROUP BY
От | Decibel! |
---|---|
Тема | Re: DISTINCT -> GROUP BY |
Дата | |
Msg-id | 8404931B-038E-4F98-98C9-BCEC81B476DF@decibel.org обсуждение исходный текст |
Ответ на | Re: DISTINCT -> GROUP BY (David Fetter <david@fetter.org>) |
Список | pgsql-hackers |
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 decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828
В списке pgsql-hackers по дате отправления: