Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> Basically the planner doesn't ever optimise for the possibility of the
> never-executed case because even a single row returned would destroy
> that assumption.
It's worse than that: the outer subplan *does* return some rows.
I suppose that all of them had NULLs in the join keys, which means
that (since 8.1 or so) nodeMergejoin discards them as unmatchable.
Had even one been non-NULL the expensive subplan would have been run.
This seems like too much of a corner case to justify adding a lot of
regards, tom lane
In response to
pgsql-performance by date
|Next:||From: Kevin Grittner||Date: 2007-10-10 18:30:13|
|Subject: Re: hashjoin chosen over 1000x faster plan|
|Previous:||From: Josh Trutwin||Date: 2007-10-10 17:25:31|
|Subject: Re: SQL Monitoring|