> On 13 Sep 2023, at 15:22, Damir Belyalov <dam(dot)bel07(at)gmail(dot)com> wrote:
> There is a table with a unique index on it and we have a query that searching DISTINCT values on this table on columns of unique index.
> We can see that Unique node is redundant for this case. So I implemented a simple patch that removes Unique node from the plan.
Is this query pattern common enough to warrant spending time on in the planner
(are there perhaps ORMs that generate such)? Have you measured the overhead of
this?
--
Daniel Gustafsson