Re: hashjoin chosen over 1000x faster plan
| От | Tom Lane |
|---|---|
| Тема | Re: hashjoin chosen over 1000x faster plan |
| Дата | |
| Msg-id | 20980.1192039650@sss.pgh.pa.us обсуждение |
| Ответ на | Re: hashjoin chosen over 1000x faster plan (Simon Riggs <simon@2ndquadrant.com>) |
| Ответы |
Re: hashjoin chosen over 1000x faster plan
Re: hashjoin chosen over 1000x faster plan |
| Список | pgsql-performance |
Simon Riggs <simon@2ndquadrant.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
machinery for.
regards, tom lane
В списке pgsql-performance по дате отправления: