Skip to content

Comment on Show HN: PipeSQL – Building SQL queries bottom-up using pipes and filtersparent

Comments

Postgres implement WITH in a way that doesn't lend itself to modularity. When you declare a subquery in a WITH block, the query optimiser won't attempt to integrate your query over that boundary. In other words, your entire subquery will be materialised before the lower query is run.

In Oracle's implementation WITH is more like a VIEW.

Edit: BTW, this is not an accident or oversight on the part of Postgres. This is in the spec!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.