Re: possible bug with group by?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: possible bug with group by?
Дата
Msg-id 19251.959223598@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: possible bug with group by?  (Joseph Shraibman <jks@selectacast.net>)
Список pgsql-sql
Joseph Shraibman <jks@selectacast.net> writes:
> But why would group by need to sort it?  To insert it into a tree to
> make lookups of distinct values faster?

No, to bring identical values together.  GROUP BY and DISTINCT are both
implemented as basically a "sort | uniq" pipeline.
        regards, tom lane


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

Предыдущее
От: Joseph Shraibman
Дата:
Сообщение: Re: possible bug with group by?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Use of index in 7.0 vs 6.5