Home Forums SQL Server 2005 T-SQL (SS2K5) Please help with Recursive CTE to get reversed people hierarchy RE: Please help with Recursive CTE to get reversed people hierarchy

  • Gagne (11/24/2014)


    A million thanks to both of you guys. I really appreciate it and I do apologize for not properly posting my question 🙂

    I ran both of them on my employee table without the filters I would normally apply so I it was processing 1979 employees and returned 7793 row.

    To be honest, I expected the loop to be slow but there is not much of a difference. They both run so fast I can't even really know what the actual difference is. CTE runs in 00:00:00 and loop runs in 00:00:01.

    You are welcome.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events