|
|
|
|
|
by anonetal
3830 days ago
|
|
This is an old discussion on the dev list: http://www.postgresql.org/message-id/201209191305.44674.db@k... .. which indicates that reliance on them being optimization fences may be too ingrained to change. I had assumed that they were treated as sub-selects (given the generally advanced optimizer that PostgreSQL has), and was quite surprised to realize that they aren't. I think this is a major shortcoming of PostgreSQL, especially given the readability advantages of CTEs makes them quite attractive to use (I usually recommend heavy use of CTEs to beginning SQL-ers). |
|