=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <postgres(at)cybertec(dot)at> writes:
> I was wondering whether it is possible to teach the planner to handle
> DISTINCT in a more efficient way:
Probably (although the interactions with ORDER BY might be tricky).
No one has touched that part of the planner in a very long time.
regards, tom lane