Hi, thanks for all. I replaced row_number() with some computed int which speeds
up a lot the query.
‐‐‐ Original Message ‐‐‐
On Tuesday, June 22nd, 2021 at 15:53, Tom Lane wrote:
> Nicolas Seinlet nico...@seinlet.com writes:
>
> > I'm trying to understand this behaviour and the limi
Nicolas Seinlet writes:
> I'm trying to understand this behaviour and the limits of CTE, when they
> reach the limits, when they cannot receive parameters from a caller, ... I'm
> running a query on PostgreSQL 10 with a cte. the query runs in ~ 10 seconds.
> If I add a second CTE with the same
On Tue, 22 Jun 2021 at 13:50, Nicolas Seinlet wrote:
> Hello,
>
> oversimplified example:
> 10 seconds version:
> | WITH cte1 AS (SELECT x,y,z FROM table) SELECT row_number() over(),x,y,z
> FROM cte1 WHERE x=32;
>
> 10 minutes version:
> | WITH cte1 AS (SELECT x,y,z FROM table), cte2 AS (SELECT r
Hello,
I'm trying to understand this behaviour and the limits of CTE, when they reach
the limits, when they cannot receive parameters from a caller, ... I'm running
a query on PostgreSQL 10 with a cte. the query runs in ~ 10 seconds. If I add a
second CTE with the same query as the previous one