Nyasha Chigwamba <[email protected]> writes: > Question: Can the planner push predicates on view columns into the underlying > LATERAL subqueries?
It can, but it will not push them into a subquery with LIMIT,
because that would potentially change the subquery result.
I'd try to get rid of all those ORDER BY LIMIT bits in your
view definition. That's generally considered an antipattern
in SQL. It's definitely an optimization fence.
regards, tom lane
