• CirquedeSQLeil (3/14/2011)


    Jeff Moden (3/14/2011)


    CirquedeSQLeil (3/14/2011)


    Jeff Moden (3/10/2011)


    CirquedeSQLeil (3/10/2011)


    Nice article Jeff. I have used a very similar method to this for very large hierarchies. Nice examples and well explained and illustrated.

    Thank you, Jason. Since you're working with very large hierarchies, have you or are you using the HierarchyID datatype at all?

    No, we don't use the HierarchyID datatype - not at all.

    Sorry for peppering you with question but is there a particular reason or is it just that there's no reason to convert legacy code?

    Two-fold. In our testing it seemed that the heirarchyid actually slowed us down a bit. Second - the change would require client sign-off/buy-in. If a client really wanted it, the legacy code could be changed - but they would need to work it into the release schedule and prioritize it. Other things always seem more important and the performance we see for our trees is really good (still need to see your method you were working on for the PASS preso).

    To be honest, I've not tested for performance using HierarchyID's but the internet seems somewhat littered with similar complaints of performance. In the short term, I can make the same offer to you that I did Sean above. Send me an email if you'd like.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)