In the example of "select distinct _expression_", the planner will never notice
that that _expression_ has anything to do with an index.
Thanks for that explanation. I assume re-writing as a 'group by' would have no bearing on that planner decision.
In the example of "select distinct _expression_", the planner will never notice
that that _expression_ has anything to do with an index.