Re: CTE materializing sets? - Mailing list pgsql-general

From Craig Ringer
Subject Re: CTE materializing sets?
Date
Msg-id 5073F2FA.5020708@ringerc.id.au
Whole thread Raw
In response to CTE materializing sets?  (Liam Caffrey <liam.caffrey@gmail.com>)
Responses Re: CTE materializing sets?  (Serge Fonville <serge.fonville@gmail.com>)
Re: CTE materializing sets?  (Tomas Vondra <tv@fuzzy.cz>)
List pgsql-general
On 10/06/2012 08:45 AM, Liam Caffrey wrote:
> Hi,
>
> If I run a CTE does that materialize the resulting data in the same (or
> a similar) way as if I created a temp table and referred to that
> instead? Or does the CTE keep the set in memory?

Really good question, I too would be interested in this.

I'd expect it'd materialize to RAM if the result is within `work_mem`
but I'd love to know for sure.

--
Craig Ringer



pgsql-general by date:

Previous
From: Dmitriy Igrishin
Date:
Subject: Re: Creating and managing triggers
Next
From: Serge Fonville
Date:
Subject: Re: CTE materializing sets?