• Sean Lange (7/30/2014)


    Evil Kraig F (7/30/2014)


    churlbut (7/30/2014)


    Hello,

    We just had a meeting a few months ago given by a DBA to us developers...

    Big advice to us was to take the Items in a WHERE Clause (if you can), apply the logic to JOINS.

    Whut? Why would he recommend that? WHERE or ON clause basically only matters as to the application of OUTER JOIN logic. Predicates are predicates. What reasoning and examples did he use to support this statement?

    I have heard others regurgitate that same myth. Not sure where it came from or why it perpetuates. :w00t:

    It's nuts. If anything, it's backwards. A subselect in an ON clause has the possibility of running for every row if it's non-deterministic (an honest mistake by an uninformed coder), whereas the WHERE clause should run and cache since you have to make it deterministic (well, as per the query parameters, just not row dependent) so the query runs right.

    Gyeah. No no no. Churlbut, please get your DBA on here and start up a thread on this. I'd love to see his justifications for this and be able to work with him to dismiss this myth, at least for one person. Gotta start somewhere.

    EDIT: On a side note, I was debating on if I should do another article, this one for tech instead of soft stuff. I may have found a topic...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA