Re: Removing useless DISTINCT clauses

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Removing useless DISTINCT clauses
Дата
Msg-id 1521706612.2459.27.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Removing useless DISTINCT clauses  (Melanie Plageman <melanieplageman@gmail.com>)
Ответы Re: Removing useless DISTINCT clauses
Список pgsql-hackers
Melanie Plageman wrote:
> Contents & Purpose
> ==================
> 
> This patch removes any additional columns in the DISTINCT clause when the
> table's primary key columns are entirely present in the DISTINCT clause. This
> optimization works because the PK columns functionally determine the other
> columns in the relation. The patch includes regression test cases.

Would it be very difficult to extend that to "if any unique constraints are
contained in the DISTINCT clause"?

Yours,
Laurenz Albe


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