Re: distinct vs group by

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: distinct vs group by
Дата
Msg-id 20050129222306.GB14571@wolff.to
обсуждение исходный текст
Ответ на distinct vs group by  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Список pgsql-novice
On Fri, Jan 28, 2005 at 02:35:21 -0800,
  Ron Mayer <rm_pg@cheapcomplexdevices.com> wrote:
>
> Should the expressions
>   select distinct x from t
> and
>   select          x from t group by x
> have the same effect?
>
> It seems the optimizer sometimes chooses different plans for those
> expressions.   Could the select distinct have used the slightly
> faster hash aggregate?

I don't think select distinct can use hash aggregate plans.

В списке pgsql-novice по дате отправления:

Предыдущее
От: Ron Mayer
Дата:
Сообщение: distinct vs group by
Следующее
От: Tom Lane
Дата:
Сообщение: Re: distinct vs group by