logoalt Hacker News

siddbootstoday at 9:55 AM1 replyview on HN

I think your assumption about inlining is essentially correct. As far as I know postgres was the last major rdbms to have an optimiser fence around CTEs.


Replies

nraynaudtoday at 11:28 AM

I concur, “the Germans” have created an algorithm that completely “see through” subqueries/CTEs when planning a query. The way the query is written has no bearing on the execution.