Re: How slow is DISTINCT?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How slow is DISTINCT?
Дата
Msg-id 22990.1018882172@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How slow is DISTINCT?  (Michael Contzen <mcontzen@dohle.com>)
Список pgsql-sql
Michael Contzen <mcontzen@dohle.com> writes:
> Does postgres sort the whole table without projection to one column an
> performs a unique on this whole table?

No, it only sorts the column(s) being selected.

My guess is that your performance problem comes from using "numeric"
datatype.  Consider int or bigint instead of numeric(10,0).
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: case statement in group by clause
Следующее
От: Roberto Mello
Дата:
Сообщение: Re: Thank you ! Re: Is there any Faster workaround ??