Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jvolkman
on Jan 12, 2023
|
parent
|
context
|
favorite
| on:
CTEs as lookup tables
CTEs used to be "optimization fences" in PostgreSQL, but that changed with v12.
https://www.depesz.com/2019/02/19/waiting-for-postgresql-12-...
DevX101
on Jan 12, 2023
|
next
[–]
This blog has a VERY high signal to noise ratio for anyone interested in digging into the PostgreSQL internals. Lots of great articles.
srcreigh
on Jan 12, 2023
|
prev
[–]
They still are sometimes. Whenever you have a CTE which is referenced more than once, to be specific.
heresjohnny
on Jan 12, 2023
|
parent
[–]
Similarly, joining a CTE to itself can also be problematic. In that case materializing to a temp table can be faster.
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: