Stef <svb@ucs.co.za> writes:
> => Could we see the results of "EXPLAIN ANALYZE", rather than just EXPLAIN,
> => for the un-analyzed case?
> Attached the output of this.
Hmm... not immediately obvious where it's going wrong. Could you try
this (after ANALYZE):
set enable_mergejoin to off;
explain analyze ... query ...
If it finishes in a reasonable amount of time, send the explain output.
regards, tom lane