Re: Why are distinct and group by choosing different plans?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why are distinct and group by choosing different plans?
Дата
Msg-id 17521.1186102087@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Why are distinct and group by choosing different plans?  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-performance
Gregory Stark <stark@enterprisedb.com> writes:
> I think "distinct" just doesn't know about hash aggregates yet. That's partly
> an oversight and partly of a "feature" in that it gives a convenient way to
> write a query which avoids them. I think it's also partly that "distinct" is
> trickier to fix because it's the same codepath as "distinct on" which is
> decidedly more complex than a simple "distinct".

It's not an oversight :-(.  But the DISTINCT/DISTINCT ON code is old,
crufty, and tightly entwined with ORDER BY processing.  It'd be nice to
clean it all up someday, but the effort seems a bit out of proportion
to the reward...

            regards, tom lane

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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: Why are distinct and group by choosing different plans?
Следующее
От: "Carlos H. Reimer"
Дата:
Сообщение: RES: RES: Improving select peformance