Re: CTE vs Subquery

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Linos <info(at)linos(dot)es>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: CTE vs Subquery
Date: 2011-10-25 16:43:45
Message-ID: 24672.1319561025@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-performance

Linos <info(at)linos(dot)es> writes:
> i am having any problems with performance of queries that uses CTE, can the
> join on a CTE use the index of the original table?

CTEs act as optimization fences. This is a feature, not a bug. Use
them when you want to isolate the evaluation of a subquery.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Linos 2011-10-25 16:47:53 Re: CTE vs Subquery
Previous Message Linos 2011-10-25 16:22:42 CTE vs Subquery