Andres Freund <and...@anarazel.de> writes: > On 2024-12-07 17:06:52 -0500, Tom Lane wrote: >> One could imagine that we split up the join filter conditions into >> "depends on RHS" and "doesn't depend on RHS" subsets, and make the >> nestloop plan node evaluate the latter set only once per LHS row, >> and then skip the inner-side scan when that condition fails.
> As I wrote in my other email, I'm also somewhat dubious it's worth having > explicit code for this in nodeNestloop.c. Yeah. Your idea of pushing the "doesn't depend on RHS" subset into a one-time Result filter atop the RHS is interesting though. Then we don't need any new executor machinery, but we pay for that with a more complex planner patch. Not sure how hard that would be. regards, tom lane