Re: CTE vs Subquery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El 25/10/11 18:43, Tom Lane escribió:
> Linos <info@xxxxxxxx> 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
> 

The truth it is that complex queries seems more readable using them (maybe a
personal preference no doubt).

Do have other popular databases the same behavior? SQL Server or Oracle for example?

Regards,
Miguel Ángel.

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux