Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by Peter He CTE Performance RE: CTE Performance
peterhe
SSChampion
Points: 11469
More actions
March 14, 2008 at 2:37 pm
#789905
I found your loop and CTE are not equivalent. In the loop, you have the code
WHERE ...
and c2.structureid not in
(select structureid
from @hierarchy)
which slows it down.