Re: LATERAL subquery predicate pushdown: filter applied after JSON construction instead of inside join (PG 18)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LATERAL subquery predicate pushdown: filter applied after JSON construction instead of inside join (PG 18)
Дата
Msg-id 4119091.1770831458@sss.pgh.pa.us
обсуждение исходный текст
Ответ на LATERAL subquery predicate pushdown: filter applied after JSON construction instead of inside join (PG 18)  (Nyasha Chigwamba <nyasha.chigwamba@voss-solutions.com>)
Ответы Re: LATERAL subquery predicate pushdown: filter applied after JSON construction instead of inside join (PG 18)
Список pgsql-performance
Nyasha Chigwamba <nyasha.chigwamba@voss-solutions.com> 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



В списке pgsql-performance по дате отправления: