> On Nov 11, 2018, at 12:54 PM, Andrew Gierth <andrew@xxxxxxxxxxxxxxxxxxxx> wrote: > … Thank you that is very helpful. Could the CTE’s theoretically be optimized in a future version of PG, to work like the subqueries? I like to use them to give names to intermediate results, but I’ll stay away from them for now. Rob