RE: How to run your CTE just once, and re-use the output

There’s an excellent article “How to run your CTE just once, and re-use the output” over at sqlsunday.com, but a few people on Reddit are wondering if inserting into a #temp table or @table variable would be any better [for performance]. As Brent Ozar is fond [paraphrasing!] of saying, “If you don’t know, you’re wasting your… Continue reading RE: How to run your CTE just once, and re-use the output