3 ms·
There is plenty of discussion about it out there (search for "postgres cte optimisation fence") including official word. Note though that simply replacing CTE
by dspillett 9y ago
There is plenty of discussion about it out there (search for "postgres cte optimisation fence") including official word.
Note though that simply replacing CTE references with appropriate sub-queries simply won't work in the recursive case, and in some cases where a CTE is referred to multiple times the result may be an even less optimal query plan.
- deleted 9y ago[deleted]