DISTINCT peformance differences

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема DISTINCT peformance differences
Дата
Msg-id GNELIHDDFBOCMGBFGEFOCELFCDAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Список pgsql-sql
If art_id is the primary key of the la table, is the latter faster?

SELECT DISTINCT la.* FROM <join> ...

or

SELECT DISTINCT ON (la.art_id) la.* FROM <join> ...

ie. Does this offer a performance improvement by only doing the distinct on
the primary key or not?

Thanks,

Chris



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

Предыдущее
От: Masaru Sugawara
Дата:
Сообщение: Re: Need Help for select
Следующее
От: Masaru Sugawara
Дата:
Сообщение: Re: Need Help for select