Re: Removing useless DISTINCT clauses

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Removing useless DISTINCT clauses
Дата
Msg-id 20180823233430.GG3326@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Removing useless DISTINCT clauses  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: Removing useless DISTINCT clauses
Список pgsql-hackers
Greetings,

* David Rowley (david.rowley@2ndquadrant.com) wrote:
> My personal opinion of only being able to completely remove the
> DISTINCT when there's a single item in the rtable (or a single base
> table) is that it's just too poor to bother with.  I think such a
> solution is best left to another patch and it should be much more
> complete and be able to track the unique properties through joins.

Doesn't that move the goalposts for this pretty far off?  Is there
some reason that doing this for the single-item case will make it
difficult to implement the additional improvements you're suggesting
later?

Given the cost of a DISTINCT and that we know pretty easily if one
exists or not, trying to eliminate it, even in the single-item case,
seems pretty worthwhile to me.  If it makes it difficult to improve on
this later then I could see pushing back on it, but this patch doesn't
seem like its doing that.

Thanks!

Stephen

Вложения

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Removing useless DISTINCT clauses
Следующее
От: David Rowley
Дата:
Сообщение: Re: Removing useless DISTINCT clauses