Re: Pulling up direct-correlated ANY_SUBLINK - Mailing list pgsql-hackers

From Antonin Houska
Subject Re: Pulling up direct-correlated ANY_SUBLINK
Date
Msg-id 90438.1568186705@antos
Whole thread Raw
In response to Re: Pulling up direct-correlated ANY_SUBLINK  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Pulling up direct-correlated ANY_SUBLINK
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> > Can we try to pull up direct-correlated ANY SubLink with the help of
> > LATERAL?
> 
> Perhaps.  But what's the argument that you'd end up with a better
> plan?  LATERAL pretty much constrains things to use a nestloop,
> so I'm not sure there's anything fundamentally different.

I think that subquery pull-up is most beneficial when the queries (both the
subquery and the upper query) contain more than a few tables. In such a case,
if only a few tables reference the upper query (or if just a single one does),
the constraints imposed by LATERAL might be less significant.

Nevertheless, I don't know how to overcome the problems that I mentioned
upthread.

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com



pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Pulling up direct-correlated ANY_SUBLINK
Next
From: Erik Rijkers
Date:
Subject: Re: don't see materialized views in information_schema