Re: Bad mis-costing of Merge Left Join in 8.0.1 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bad mis-costing of Merge Left Join in 8.0.1
Date
Msg-id 13823.1112577015@sss.pgh.pa.us
Whole thread Raw
In response to Bad mis-costing of Merge Left Join in 8.0.1  (Andrew - Supernews <andrew+nonews@supernews.com>)
List pgsql-bugs
Andrew - Supernews <andrew+nonews@supernews.com> writes:
> The cost for the Merge Left Join is clearly preposterous, since the join
> cost can't be lower than the cost of the left branch, as it is an outer
> join and therefore that branch must be run to completion. I do not fully
> understand the cost estimation code for the merge join, but it appears to
> be reducing its total cost estimate below that of the child nodes on the
> assumption that the join can be aborted early, which is clearly not the
> case for outer joins.

Yeah, you're right ... it needs to consider whether the join is OUTER.
This bug has been there for a long time ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Andrew - Supernews
Date:
Subject: Bad mis-costing of Merge Left Join in 8.0.1
Next
From: "Andrew Grillet"
Date:
Subject: BUG #1583: Locale problem