"Michael Contzen" <Michael(dot)Contzen(at)dohle(dot)com> writes:
> [ select distinct takes a long time on 7+ million rows ]
What do you have sort_mem set to? The default value is mighty small,
and that would translate directly to poor performance in DISTINCT.
Still though, the speed differential against Oracle is surprising,
given that they don't seem to be using a fundamentally different
implementation. Time to get out the profiler ...
regards, tom lane