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.
Folks,
I've noticed that queries of the form
SELECT DISTNCT foo, bar, baz
FROM quux
WHERE ...
perform significantly worse than the equivalent using GROUP BY.
SELECT foo, bar, baz
FROM quux
WHERE ...
GROUP BY foo, bar, baz
Where would I start looking in order to make them actually equivalent
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.
Regards
Pavel Stehule
2008/6/3 David Fetter [EMAIL PROTECTED]:
Folks,
I've
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
2008/6/3 David Fetter [EMAIL PROTECTED]:
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