Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)ru> writes:
> I've just discovered a problem with quite simple query. It's really
> confusing me.
> Postgresql 8.3.1, random_page_cost=1.1. All tables were analyzed before
> query.
What have you got effective_cache_size set to?
regards, tom lane