• patrickmcginnis59 10839 (7/6/2015)


    Again I am not sure why Oracle can make their PL/SQL using cursors as fast as set based operations and MS cannot. Cursors are not evil, and not bad, just a different method of processing data.

    There are cases where you want set oriented (or as a better generalization in my opinion, "declarative code"), and there are clearly reasons why T-SQL is slow, I have a nice stack of theories and opinions on that. But diving into conversations like this get TREMENDOUSLY UNPOPULAR here in my experience, but it makes sense though, the folks here aren't database server implementers, they are database server users, and for that matter, a great majority of folks have no interest in generalizing their knowledge past the MS product base. Such is the nature of the forum.

    But yeah, T-SQL sucks giant gobs of performance out of looped code, and in my opinion, even Microsoft understands this, hence their new compiled implementations in 2014. Sometimes you just gotta have a faster stack, and Microsoft is not going to miss out on that if they can help it.

    With that I have to ask, what is YOUR definition of a "database Implementer"?

    --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)