IF IF IF versus IF Condition 1 and condition 2 and condition X

  • Actually, in Assembler comparison of 2 values is implemented via deducting of one value from another.

    So, if you intuitively replace comparison with deduction then it means that you have some die hard habits from those old golden times.

    🙂

     

    _____________
    Code for TallyGenerator

  • Sergiy wrote:

    Actually, in Assembler comparison of 2 values is implemented via deducting of one value from another.

    So, if you intuitively replace comparison with deduction then it means that you have some die hard habits from those old golden times.

    🙂

    Guilty as charged

    😎

    Some habits just won't die 😉

  • You guys must be suffering from Covid or something.  You guys know better than to banter about with claims of performance without demonstrative code to prove your position. Especially since there have been claims of performance and claims of non-performance and claims of so little performance gain as to not be worth it, I think that all ya'all should put together a test and prove what you're saying.  A million rows is a trivial test nowadays so do one with a million rows and one with 10 million rows and then we'll know for sure.

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

  • Jeff Moden wrote:

    You guys must be suffering from Covid or something.  You guys know better than to banter about with claims of performance without demonstrative code to prove your position. Especially since there have been claims of performance and claims of non-performance and claims of so little performance gain as to not be worth it, I think that all ya'all should put together a test and prove what you're saying.  A million rows is a trivial test nowadays so do one with a million rows and one with 10 million rows and then we'll know for sure.

    I'd be really surprised if it was enough of a difference in performance that it could even be measured (except that the subtraction method may be noticeably slower than the IF ... ANDs method).

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.

Viewing 4 posts - 31 through 33 (of 33 total)

You must be logged in to reply to this topic. Login to reply