Re: CTE materializing sets?

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Liam Caffrey <liam(dot)caffrey(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CTE materializing sets?
Date: 2012-10-09 09:48:42
Message-ID: 5073F2FA.5020708@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Serge Fonville 2012-10-09 09:53:10 Re: CTE materializing sets?
Previous Message davegeeit 2012-10-09 07:38:50 Re: Postgres will not start due to corrupt index