I see, I never knew that.
Indeed there is a hashed subplan for the EXISTS by itself. So that explains
it.
Thanks Tom.
On Mon, Nov 8, 2021 at 12:35 PM Tom Lane wrote:
> Jimmy A writes:
> > I have two equivalent queries, one with an EXISTS clause by itself and
> one
> > wr
A description of what you are trying to achieve and what results you
expect.:
I have two equivalent queries, one with an EXISTS clause by itself and one
wrapped in a (SELECT EXISTS) and the "naked" exists is much slower.
I would expect both to be the same speed / have same execution plan.
-- slow