Re: BUG #6426: Complex query runs 10 times longer with "LIMIT 20" - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6426: Complex query runs 10 times longer with "LIMIT 20"
Date
Msg-id 24544.1328132915@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #6426: Complex query runs 10 times longer with "LIMIT 20"  (Andrew Schetinin <aschetinin@gmail.com>)
Responses Re: BUG #6426: Complex query runs 10 times longer with "LIMIT 20"
List pgsql-bugs
Andrew Schetinin <aschetinin@gmail.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6425: Bus error in slot_deform_tuple
Next
From: "bdmytrak@eranet.pl"
Date:
Subject: Re: BUG #6421: Revoke column level privilage