pginfo <pginfo(at)t1(dot)unisoftbg(dot)com> writes:> I think that the problem is in sorting.
Not according to the EXPLAIN results ... but did you change sort_mem?The default value is kinda small.
regards, tom lane