Andrew Schetinin <aschetinin(at)gmail(dot)com> writes:
> In my specific case, what I've seen from the query execution plans, is that
> without LIMIT the query uses Hash Joins, but once I add LIMIT, it starts
> using Nested Loop Joins almost everywhere.
Usually, that's an appropriate change for a small LIMIT. It's certainly
not a priori evidence of a planner bug.
If you want useful comments about this, please review
http://wiki.postgresql.org/wiki/Slow_Query_Questions
about how to provide an adequate description of your problem.
regards, tom lane