Re: space for optimalization: DISTINCT without index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: space for optimalization: DISTINCT without index
Дата
Msg-id 2407.1134427878@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: space for optimalization: DISTINCT without index  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-hackers
Bruno Wolff III <bruno@wolff.to> writes:
> DISTINCT will require a sort step to remove duplicates. GROUP BY can use
> either a sort or hash aggregate plan. If there are few distinct values,
> the hash aggregate plan can be much faster.

The DISTINCT code hasn't been revisited in a long time.  One obstacle to
improving it is that it's very tightly intertwined with ORDER BY.  While
fixing that might be just a Small Matter Of Programming, it's not clear
how to decouple them without breaking DISTINCT ON.
        regards, tom lane


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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Something I don't understand with the use of schemas
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: pg_relation_size locking