You said, "The plans do not give any clue to their performance difference." But there ARE indications. The thickness of the arrows are a real indicator. The thicker the arrow, the more rows in that part of the plan. I can see that there are thicker arrows with the CTE. More rows will, generally, take more time. Hover with the mouse over the arrows to see the number of rows.

Wow, this is really disappointing. I hadn't yet tested much with CTE's on the performance, as the db I am working with now is relatively small, but I just kind of figured that since CTE's were working in a set-based fashion it would perform better than the looping. Hmmmm.

What I meant in "The plans do not give any clue to their performance difference." is that the CTE execution plan doesn't give the details in the recursive execution. The row number (the thickness of the arrow) is actually the final output. SQL server generates only one execution plan for a CTE.

The execution plan of the loop method showed in the article is for the one execution of the looping statement. You know, SQL server generates one execution plan for every execution of the same statement in the loop. So the arrow (row number) is thinner in each plan.