News for hackers. Stuff that matters.
Re:The SQL filter clause: selective aggregates by goldenkey on Monday May 30, 2016 @09:17AM (#11801147)
You can still do many subselect queries without with. Its really only an issue with the more complex usages.
Re:The SQL filter clause: selective aggregates by Xophmeister on Monday May 30, 2016 @09:24AM (#11801187)
I personally find CTEs much easier to read than subqueries.
Re:The SQL filter clause: selective aggregates by wesd on Monday May 30, 2016 @10:39AM (#11801533)
and you can use them in multiple places. I'm not sure if you have the same subquery twice if the query optimizer uses a single dataset.
Re:The SQL filter clause: selective aggregates by goldenkey on Monday May 30, 2016 @05:19PM (#11803272)
Be careful though, above poster mentions that a chain of CTE is almost certain to lead to sequential scans rather than parallelized (optimized) execution.