• Michael Ebaya (11/3/2010)


    happycat59 (11/3/2010)


    Not only is the original article of interest (and it is great to have someone prepared to write about their findings...thanks Terry)

    Does no one actually care the entire article is wrong, top to bottom?

    The speed increase is probably caused by the inadvertent change of the meaning of the query, that has been shown painfully clearly. Other discussion that has ensued, taught me a trick or two. So thanks Terry!

    But the core of the article, the technique of using CASE expressions to tame NULL values is sometimes very handy, especially when either side of the comparison may be NULL.

    The CASE expression makes the intent crystal clear to first-time reader of the code, or the writer after a few years-->weeks. Changing the polarity of the comparison and switching the "Boolean" values 0 and 1 makes it easy to change which way NULLs lean.

    The major caveat in the discussion, placing the CASE expressions in OUTER JOINs, not WHERE clauses where they easily bite with their INNER nature, was spot-on. My own bite-marks? Much better now, thank you.