Re: Removing useless DISTINCT clauses
От | David Rowley |
---|---|
Тема | Re: Removing useless DISTINCT clauses |
Дата | |
Msg-id | CAKJS1f8AnhCdLcXesLGbUUjGx2+QETHLeR7q-KBriuR-Lm8maQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Removing useless DISTINCT clauses (Jim Finnerty <jfinnert@amazon.com>) |
Ответы |
Re: Removing useless DISTINCT clauses
|
Список | pgsql-hackers |
On 24 March 2018 at 01:42, Jim Finnerty <jfinnert@amazon.com> wrote: > Distinctness can also be preserved across joins, so if you have a 'snowflake > query' type join, where all the joins are to a unique key, then the > distinctness of the other side of the join is preserved. For example, a > SELECT DISTINCT * FROM fact_table ... that joins from each column in its > compound primary key to a unique key of another (dimension) table would > remain distinct, and so you could drop the DISTINCT from the query. I'm aware. It is something I'm interested in but would require several orders of magnitude more work than what I've done for this patch. You may have noticed the other work I did a while back to detect if joins cause row duplicate or not, so it's certainly something I've thought about. If Amazon would like to sponsor work in this area then please see [1]. It certainly would be great to see that happen. [1] https://wiki.postgresql.org/wiki/How_to_sponsor_a_feature -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: