scott.pletcher (6/29/2010)
So, the inline CTE has better performance than a tally table? Interesting. Sometimes SQL's performance traits are a bit quirky.
In other functions, I've not found that to be true. The Tally Table normally squeaks past the CTE for duration but the CTE gens virtually no reads. I guess it depends on how you want to impact the system. When I get around to the Tally Table article rewrite, I'll include million row testing for both methods.
--Jeff Moden
Change is inevitable... Change for the better is not.