"Kynn Jones" <kynnjo@gmail.com> writes:
> So it seems like turning off ENABLE_SEQSCAN is the way to go.
Try reducing random_page_cost a bit instead. Also, have you got
effective_cache_size set to something that's realistic for your
machine?
One problem with this test is that your smaller tables probably fit in
memory whereas the big ones may not, so it's not a given that your test
accurately reflects how the real query will go down.
regards, tom lane