Re: Group by more efficient than distinct?

From: Francisco Reyes <lists(at)stringsutils(dot)com>
To: PFC <lists(at)peufeu(dot)com>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Pgsql performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Group by more efficient than distinct?
Date: 2008-04-20 15:15:36
Message-ID: cone.1208704536.428347.85914.1000@zoraida.natserv.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

PFC writes:

>- If you process up to some percentage of your RAM worth of data, hashing
> is going to be a lot faster

Thanks for the excellent breakdown and explanation. I will try and get sizes
of the tables in question and how much memory the machines have.

> - If you need DISTINCT ON, well, you're stuck with the Sort
> - So, for the time being, you can replace DISTINCT with GROUP BY...

Have seen a few of those already on some code (new job..) so for those it is
a matter of having a good disk subsystem?

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message dforums 2008-04-20 17:48:53 Vacuum settings
Previous Message Francisco Reyes 2008-04-20 15:12:10 Re: Group by more efficient than distinct?