> > shared_buffers = 1000
> > sort_mem = 1024
> > effective_cache_size = 1000
>
> effective_cache_size should be much higher, like 3/4 of your available RAM.
> This is probably the essence of your planner problem; the planner thinks you
> have no RAM.
I set effective_cache_size to 64000 on a machine with 2GB of physical
RAM, and the behaviour is exactly the same.