Yes, I had done UNION.  UNION ALL achives the expected plan and speed! Thank
you!
BTW, this is interesting, because there are only about 5 or 6 rows max
returned from both queries - but I guess the planner expects more and hence
changes the plan to remove duplicates.

On Sun, Jul 19, 2009 at 9:05 PM, Scott Marlowe <scott.marl...@gmail.com>wrote:

> On Sun, Jul 19, 2009 at 6:10 PM, Robert James<srobertja...@gmail.com>
> wrote:
> > UNION was better, but still 5 times as slow as either query done
> > individually.
> > set enable_seqscan=off didn't help at all - it was totally ignored
> > Is there anything else I can do?
>
> Did you try union, or union all?
>

Reply via email to